Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem/src/tolua/CMakeLists.txt @ 2233

Last change on this file since 2233 was 2233, checked in by rgrieder, 15 years ago

Added 'w' argument for tolua. That specifies the working directory when including files in the package.
If 'w' is not specified, the path of the package file is used. And if even that is not given, the application working directory is used.

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1# TODO: only build the object files once
2
3SET (TOLUALIB_SRC_FILES
4  tolua_event.c
5  tolua_is.c
6  tolua_map.c
7  tolua_push.c
8  tolua_to.c
9)
10
11ADD_LIBRARY (tolualib_orxonox SHARED ${TOLUALIB_SRC_FILES})
12TARGET_LINK_LIBRARIES (tolualib_orxonox ${LUA_LIBRARIES})
13
14SET (TOLUAGEN_SRC_FILES
15  tolua.c
16  toluabind.c
17)
18
19ADD_EXECUTABLE (toluagen_orxonox ${TOLUAGEN_SRC_FILES} ${TOLUALIB_SRC_FILES})
20TARGET_LINK_LIBRARIES (toluagen_orxonox ${LUA_LIBRARIES})
21
22SET (TOLUA_PACKAGE "${CMAKE_CURRENT_SOURCE_DIR}/tolua-5.1.pkg")
23GET_TARGET_PROPERTY(TOLUAGEN_EXE toluagen_orxonox LOCATION)
24ADD_CUSTOM_COMMAND(
25  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/toluabind_orxonox.c
26  COMMAND ${TOLUAGEN_EXE} -n tolua -w ${CMAKE_CURRENT_SOURCE_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/toluabind_orxonox.c -H ${CMAKE_CURRENT_BINARY_DIR}/toluabind_orxonox.h ${TOLUA_PACKAGE}
27  DEPENDS
28    toluagen_orxonox
29    tolua-5.1.pkg
30    lua/compat-5.1.lua
31    lua/compat.lua
32    lua/basic.lua
33    lua/feature.lua
34    lua/verbatim.lua
35    lua/code.lua
36    lua/typedef.lua
37    lua/container.lua
38    lua/package.lua
39    lua/module.lua
40    lua/namespace.lua
41    lua/define.lua
42    lua/enumerate.lua
43    lua/declaration.lua
44    lua/variable.lua
45    lua/array.lua
46    lua/function.lua
47    lua/operator.lua
48    lua/class.lua
49    lua/clean.lua
50    lua/doit.lua
51    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
52)
53
54SET (TOLUAEXE_SRC_FILES
55  tolua.c
56  toluabind_orxonox.c
57)
58
59ADD_EXECUTABLE (tolua_orxonox ${TOLUAEXE_SRC_FILES} ${TOLUALIB_SRC_FILES})
60TARGET_LINK_LIBRARIES (tolua_orxonox ${LUA_LIBRARIES})
Note: See TracBrowser for help on using the repository browser.