diff options
Diffstat (limited to 'src/Bindings/CMakeLists.txt')
-rw-r--r-- | src/Bindings/CMakeLists.txt | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/Bindings/CMakeLists.txt b/src/Bindings/CMakeLists.txt index 5c79225cc..05d4c7e4f 100644 --- a/src/Bindings/CMakeLists.txt +++ b/src/Bindings/CMakeLists.txt @@ -56,7 +56,6 @@ set (BINDING_OUTPUTS ) set(BINDING_DEPENDENCIES - tolua ../Bindings/AllToLua.pkg ../Bindings/BindingsProcessor.lua ../Bindings/LuaFunctions.h @@ -139,17 +138,21 @@ set(BINDING_DEPENDENCIES ) if (NOT MSVC) - ADD_CUSTOM_COMMAND( - # add any new generated bindings here - OUTPUT ${BINDING_OUTPUTS} - - # Regenerate bindings: - COMMAND tolua -L BindingsProcessor.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - - # add any new generation dependencies here - DEPENDS ${BINDING_DEPENDENCIES} - ) + if (HAS_LUA_INTERPRETER) + ADD_CUSTOM_COMMAND( + OUTPUT ${BINDING_OUTPUTS} + COMMAND lua BindingsProcessor.lua + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${BINDING_DEPENDENCIES} + ) + else() + ADD_CUSTOM_COMMAND( + OUTPUT ${BINDING_OUTPUTS} + COMMAND tolua -L BindingsProcessor.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${BINDING_DEPENDENCIES} tolua + ) + endif() endif () set_source_files_properties(${BINDING_OUTPUTS} PROPERTIES GENERATED TRUE) |