Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/orxonox/CMakeLists.txt @ 2518

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 
1ADD_SOURCE_FILES(
2  CameraManager.cc
3  GraphicsEngine.cc
4  LevelManager.cc
5  Main.cc
6  PlayerManager.cc
7  Settings.cc
8)
9
10ADD_SOURCE_DIRECTORY(gamestates)
11ADD_SOURCE_DIRECTORY(gui)
12ADD_SOURCE_DIRECTORY(objects)
13ADD_SOURCE_DIRECTORY(overlays)
14ADD_SOURCE_DIRECTORY(tools)
15
16WRITE_SOURCE_FILES(ORXONOX_SRC_FILES)
17
18INCLUDE(UseTolua)
19TOLUA(Orxonox ORXONOX_SRC_FILES INPUTFILES gui/GUIManager.h)
20
21ADD_EXECUTABLE(orxonox ${ORXONOX_SRC_FILES})
22
23IF(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})
32ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
33
34TARGET_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
48INSTALL(TARGETS orxonox RUNTIME DESTINATION bin)
Note: See TracBrowser for help on using the repository browser.