Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Replaced most of the ELSE(…) and ENDIF(…) with ELSE() and ENDIF(). Kept the shorter and the spreaded ones for better clarity since that's what it originally was thought for. But I can really pollute the code when having long conditions and lots of IFs.

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1SET_SOURCE_FILES(ORXONOX_SRC_FILES
2  CameraManager.cc
3  GraphicsEngine.cc
4  LevelManager.cc
5  Main.cc
6  PlayerManager.cc
7  Settings.cc
8)
9ADD_SUBDIRECTORY(gamestates)
10ADD_SUBDIRECTORY(gui)
11ADD_SUBDIRECTORY(objects)
12ADD_SUBDIRECTORY(overlays)
13ADD_SUBDIRECTORY(tools)
14GET_ALL_HEADER_FILES(ORXONOX_HDR_FILES)
15SET(ORXONOX_FILES ${ORXONOX_SRC_FILES} ${ORXONOX_HDR_FILES})
16
17GENERATE_SOURCE_GROUPS(${ORXONOX_FILES})
18GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h)
19
20# Not using precompiled header files: Avoid dependencies
21INCLUDE_DIRECTORIES(pch/nopch)
22
23ADD_EXECUTABLE(orxonox ${ORXONOX_FILES})
24GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION)
25GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
26SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
27
28IF(NETWORKTRAFFIC_TESTING_ENABLED)
29  SET(ORXONOXS_SRC_FILES
30    GraphicsEngine.cc
31    objects/Camera.cc
32    CameraManager.cc
33  )
34  ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES})
35ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
36
37TARGET_LINK_LIBRARIES( orxonox
38  ${OGRE_LIBRARY}
39  ${CEGUI_LIBRARY}
40  ${LUA_LIBRARIES}
41  ${CEGUILUA_LIBRARY}
42  ogreceguirenderer_orxonox
43  tinyxml++_orxonox
44  tolua++_orxonox
45  util
46  core
47  #audio
48  network
49)
50
51# When using Visual Studio we want to use the output directory as working
52# directory and we also want to specify where the external dlls
53# (lua, ogre, etc.) are. The problem hereby is that these information cannot
54# be specified in CMake because they are not stored in the actual project file.
55# This workaround will create a configured *.vcproj.user file that holds the
56# right values. When starting the solution for the first time,
57# these get written to the *vcproj.yourPCname.yourname.user
58IF(MSVC)
59  IF(CMAKE_CL_64)
60    SET(MSVC_PLATFORM "x64")
61  ELSE()
62    SET(MSVC_PLATFORM "Win32")
63  ENDIF()
64  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
65ENDIF(MSVC)
66
67IF(NOT WIN32)
68  INSTALL(TARGETS orxonox RUNTIME DESTINATION bin)
69ENDIF()
Note: See TracBrowser for help on using the repository browser.