Last change
on this file since 1123 was
1123,
checked in by rgrieder, 16 years ago
|
- cmake is now capable of building to a specified directory. That means the src directory stays clean.
To use this, create a new directory (e.g. build/), switch to it and write:
cmake orxonox_root_path #e.g. 'cmake ..', when you create myBranch/build
make
- the header files specified in tolua.pkg are now relative to the src/ directory
- removed verbose make output (much better sight on gcc warnings and build process)
If you need verbose output: 'cmake -D make_verb:1 path'
|
File size:
950 bytes
|
Line | |
---|
1 | SET(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 | |
---|
12 | ADD_EXECUTABLE(tolua ${TOLUA_SRC_FILES}) |
---|
13 | |
---|
14 | TARGET_LINK_LIBRARIES(tolua |
---|
15 | ${Lua_LIBRARIES} |
---|
16 | ${Lua_LIBRARY} |
---|
17 | m |
---|
18 | ) |
---|
19 | |
---|
20 | |
---|
21 | |
---|
22 | SET(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 | |
---|
32 | SET_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 | |
---|
40 | GET_TARGET_PROPERTY(TOLUA_EXE tolua LOCATION) |
---|
41 | ADD_CUSTOM_COMMAND( |
---|
42 | OUTPUT tolua_bind.h tolua_bind.cc |
---|
43 | COMMAND ${TOLUA_EXE} -n orxonox -o tolua/tolua_bind.cc -H tolua/tolua_bind.h tolua/tolua.pkg |
---|
44 | DEPENDS tolua |
---|
45 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src |
---|
46 | ) |
---|
47 | |
---|
48 | ADD_LIBRARY(tolualib ${TOLUALIB_SRC_FILES}) |
---|
49 | |
---|
50 | TARGET_LINK_LIBRARIES(tolualib |
---|
51 | ${Lua_LIBRARIES} |
---|
52 | ${Lua_LIBRARY} |
---|
53 | ) |
---|
54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.