1
0

Fixed bindings generation for Win64 builds.

Fixes #1092.
This commit is contained in:
Mattes D 2014-06-14 15:47:37 +02:00
parent af981cc718
commit f1e3010839
3 changed files with 29 additions and 9 deletions

1
src/Bindings/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
lua51.dll

Binary file not shown.

View File

@ -82,17 +82,36 @@ set(BINDING_DEPENDECIES
include_directories(Bindings) include_directories(Bindings)
include_directories(.) include_directories(.)
ADD_CUSTOM_COMMAND( if (WIN32)
# add any new generated bindings here ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h # add any new generated bindings here
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
# command execuded to regerate bindings # Copy the Lua DLL into the Bindings folder, so that tolua can run from there:
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg COMMAND copy /y ..\\..\\MCServer\\lua51.dll .
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
# add any new generation dependencies here # Regenerate bindings:
DEPENDS ${BINDING_DEPENDECIES} COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
else ()
ADD_CUSTOM_COMMAND(
# add any new generated bindings here
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/Bindings.h
# Regenerate bindings:
COMMAND tolua -L virtual_method_hooks.lua -o Bindings.cpp -H Bindings.h AllToLua.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Bindings/
# add any new generation dependencies here
DEPENDS ${BINDING_DEPENDECIES}
)
endif ()
set_source_files_properties(Bindings/Bindings.cpp PROPERTIES GENERATED TRUE)
set_source_files_properties(Bindings/Bindings.h PROPERTIES GENERATED TRUE)
if (NOT MSVC) if (NOT MSVC)