summaryrefslogtreecommitdiffstats
path: root/lib/tolua++/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tolua++/CMakeLists.txt')
m---------lib/tolua++0
-rw-r--r--lib/tolua++/CMakeLists.txt60
2 files changed, 0 insertions, 60 deletions
diff --git a/lib/tolua++ b/lib/tolua++
new file mode 160000
+Subproject 9181fc9ef73fa1c052f968d68dc60538f144a47
diff --git a/lib/tolua++/CMakeLists.txt b/lib/tolua++/CMakeLists.txt
deleted file mode 100644
index 02883397e..000000000
--- a/lib/tolua++/CMakeLists.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-
-cmake_minimum_required (VERSION 2.6)
-project (tolua++)
-
-include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
-include_directories ("${PROJECT_SOURCE_DIR}/include/")
-include_directories ("${PROJECT_SOURCE_DIR}/../")
-include_directories ("${PROJECT_SOURCE_DIR}")
-
-find_program(XXD_EXECUTABLE xxd)
-
-if(NOT XXD_EXECUTABLE STREQUAL "XXD_EXECUTABLE-NOTFOUND")
- add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/basic_lua.h
- COMMAND ${XXD_EXECUTABLE} -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_EXECUTABLE} -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_EXECUTABLE} -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_EXECUTABLE} -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)
- add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/src/bin/container_lua.h
- COMMAND ${XXD_EXECUTABLE} -i lua/container.lua | sed 's/unsigned char/static const unsigned char/g' >container_lua.h
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/src/bin/
- DEPENDS ${PROJECT_SOURCE_DIR}/src/bin/lua/container.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 ${PROJECT_SOURCE_DIR}/src/bin/container_lua.h)
-else()
- message("xxd not found, changes to tolua scripts will be ignored")
-endif()
-
-
-file(GLOB LIB_SOURCE
- "src/lib/*.c"
-)
-
-file(GLOB BIN_SOURCE
- "src/bin/*.c"
-)
-
-add_executable(tolua ${BIN_SOURCE})
-add_library(tolualib ${LIB_SOURCE})
-target_link_libraries(tolualib lua)
-
-#m is the standard math librarys
-if(UNIX)
-target_link_libraries(tolua m ${DYNAMIC_LOADER})
-endif()
-
-if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
- add_flags_lnk(-L/usr/local/lib)
-endif()
-
-target_link_libraries(tolua tolualib lua)