summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/CMakeLists.txt
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-20 22:36:24 +0100
committermadmaxoft <github@xoft.cz>2014-03-20 22:36:24 +0100
commit62f84d968a71ab14f6d79696fd1312a17239ba60 (patch)
tree0fcc5c7192de84edcba547f417c9b5f1bb62077e /lib/tolua++/CMakeLists.txt
parentPlugins can set flying speed. (diff)
parentFixed enum checking functions not being called in generated code (diff)
downloadcuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.tar
cuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.tar.gz
cuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.tar.bz2
cuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.tar.lz
cuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.tar.xz
cuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.tar.zst
cuberite-62f84d968a71ab14f6d79696fd1312a17239ba60.zip
Diffstat (limited to 'lib/tolua++/CMakeLists.txt')
-rw-r--r--lib/tolua++/CMakeLists.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/tolua++/CMakeLists.txt b/lib/tolua++/CMakeLists.txt
index 5ec8ee822..75a301a53 100644
--- a/lib/tolua++/CMakeLists.txt
+++ b/lib/tolua++/CMakeLists.txt
@@ -5,6 +5,29 @@ project (tolua++)
include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")
+include_directories ("${PROJECT_SOURCE_DIR}")
+
+if(UNIX)
+ add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/basic_lua.h
+ COMMAND xxd -i lua/basic.lua | sed 's/unsigned char/static const unsigned char/g' >basic_lua.h
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
+ DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/basic.lua)
+ add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/enumerate_lua.h
+ COMMAND xxd -i lua/enumerate.lua | sed 's/unsigned char/static const unsigned char/g' >enumerate_lua.h
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
+ DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/enumerate.lua)
+ add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/function_lua.h
+ COMMAND xxd -i lua/function.lua | sed 's/unsigned char/static const unsigned char/g' >function_lua.h
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
+ DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/function.lua)
+ add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/declaration_lua.h
+ COMMAND xxd -i lua/declaration.lua | sed 's/unsigned char/static const unsigned char/g' >declaration_lua.h
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
+ DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/declaration.lua)
+ set_property(SOURCE src/bin/toluabind.c APPEND PROPERTY OBJECT_DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/enumerate_lua.h ${PROJECT_SOURCE_DIR}/src/bin/basic_lua.h ${PROJECT_SOURCE_DIR}/src/bin/function_lua.h ${PROJECT_SOURCE_DIR}/src/bin/declaration_lua.h)
+ message(hello)
+endif()
+
file(GLOB LIB_SOURCE
"src/lib/*.c"
@@ -14,6 +37,8 @@ file(GLOB BIN_SOURCE
"src/bin/*.c"
)
+
+
add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})