Last change
on this file since 2518 was
2518,
checked in by rgrieder, 16 years ago
|
Adjusted source file macros to cmake 2.6 because it offers PARENT_SCOPE variable setting which removes my little hack with the CMake cache.
Also notice that the syntax has changed:
ADD_SOURCE_FILES(
Blubb.cc
Asdf.cc
)
ADD_SOURCE_DIRECTORY(ford_prefect)
These two commands can be written in an arbitrary order.
To actually use the created list of souce files, there is a third macro:
WRITE_SOURCE_FILES(myVariableName)
A demonstration can be found by looking at src/orxonox/CMakeLists.txt and src/orxonox/objects/CMakeLists.txt
|
-
Property svn:eol-style set to
native
|
File size:
914 bytes
|
Line | |
---|
1 | ADD_SOURCE_FILES( |
---|
2 | CameraManager.cc |
---|
3 | GraphicsEngine.cc |
---|
4 | LevelManager.cc |
---|
5 | Main.cc |
---|
6 | PlayerManager.cc |
---|
7 | Settings.cc |
---|
8 | ) |
---|
9 | |
---|
10 | ADD_SOURCE_DIRECTORY(gamestates) |
---|
11 | ADD_SOURCE_DIRECTORY(gui) |
---|
12 | ADD_SOURCE_DIRECTORY(objects) |
---|
13 | ADD_SOURCE_DIRECTORY(overlays) |
---|
14 | ADD_SOURCE_DIRECTORY(tools) |
---|
15 | |
---|
16 | WRITE_SOURCE_FILES(ORXONOX_SRC_FILES) |
---|
17 | |
---|
18 | INCLUDE(UseTolua) |
---|
19 | TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h) |
---|
20 | |
---|
21 | ADD_EXECUTABLE(orxonox ${ORXONOX_SRC_FILES}) |
---|
22 | |
---|
23 | IF(NETWORKTRAFFIC_TESTING_ENABLED) |
---|
24 | |
---|
25 | SET( ORXONOXS_SRC_FILES |
---|
26 | GraphicsEngine.cc |
---|
27 | objects/Camera.cc |
---|
28 | CameraManager.cc |
---|
29 | ) |
---|
30 | |
---|
31 | ADD_LIBRARY(orxonoxs SHARED ${ORXONOX_SRC_FILES}) |
---|
32 | ENDIF(NETWORKTRAFFIC_TESTING_ENABLED) |
---|
33 | |
---|
34 | TARGET_LINK_LIBRARIES( orxonox |
---|
35 | ${OGRE_LIBRARY} |
---|
36 | ${CEGUI_LIBRARY} |
---|
37 | ${LUA_LIBRARIES} |
---|
38 | #${CEGUI_SCRIPT_LIBRARIES} |
---|
39 | ceguilua_orxonox |
---|
40 | tinyxml_orxonox |
---|
41 | tolualib_orxonox |
---|
42 | util |
---|
43 | core |
---|
44 | audio |
---|
45 | network |
---|
46 | ) |
---|
47 | |
---|
48 | INSTALL(TARGETS orxonox RUNTIME DESTINATION bin) |
---|
Note: See
TracBrowser
for help on using the repository browser.