Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/tolua/CMakeLists.txt @ 1115

Last change on this file since 1115 was 1115, checked in by landauf, 16 years ago

tried to integrate the whole tolua-thing in proper cmake code

File size: 984 bytes
Line 
1SET(TOLUA_SRC_FILES
2  tolua.c
3  tolua_event.c
4  tolua_is.c
5  tolua_map.c
6  tolua_push.c
7  tolua_to.c
8  toluabind.c
9)
10
11
12ADD_EXECUTABLE(tolua ${TOLUA_SRC_FILES})
13
14TARGET_LINK_LIBRARIES(tolua
15  ${Lua_LIBRARIES}
16  ${Lua_LIBRARY}
17  m
18)
19
20
21
22SET(TOLUALIB_SRC_FILES
23  tolua_event.c
24  tolua_is.c
25  tolua_map.c
26  tolua_push.c
27  tolua_to.c
28  tolua_bind.cc
29  tolua_bind.h
30)
31
32SET_SOURCE_FILES_PROPERTIES(tolua_bind.h
33  PROPERTIES
34  OBJECT_DEPENDS tolua_bind.h
35  OBJECT_DEPENDS tolua_bind.cc
36  GENERATED true
37  HEADER_FILE_ONLY true
38)
39
40GET_TARGET_PROPERTY(TOLUA_EXE tolua LOCATION)
41ADD_CUSTOM_COMMAND(
42  OUTPUT tolua_bind.h tolua_bind.cc
43  COMMAND ${TOLUA_EXE} -n orxonox -o ../../src/tolua/tolua_bind.cc -H ../../src/tolua/tolua_bind.h ../../src/tolua/tolua.pkg
44  DEPENDS tolua
45  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin/lib
46)
47
48ADD_LIBRARY(tolualib ${TOLUALIB_SRC_FILES})
49
50TARGET_LINK_LIBRARIES(tolualib
51  ${Lua_LIBRARIES}
52  ${Lua_LIBRARY}
53)
54
Note: See TracBrowser for help on using the repository browser.