From 2ca06cc213b6dabcaca8be4609a652f26500fb1a Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 12 Jan 2014 17:20:14 +0100 Subject: CMake generates Bindings when not existant (win) --- src/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/CMakeLists.txt') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 853138769..22c58fca3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,16 @@ if (NOT MSVC) else () + # Generate the Bindings if they don't exist: + if (NOT EXISTS "${PROJECT_SOURCE_DIR}/Bindings/Bindings.cpp") + message("Bindings.cpp not found, generating now") + set(tolua_executable ${PROJECT_SOURCE_DIR}/Bindings/tolua++.exe) + execute_process( + COMMAND ${tolua_executable} -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Bindings + ) + endif() + function(includefolder PATH) FILE(GLOB FOLDER_FILES "${PATH}/*.cpp" -- cgit v1.2.3