Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2621 was 2621, checked in by rgrieder, 16 years ago

This commit gets a little ugly, couldn't separate that anymore:

  • Renamed UseTolua.cmake to GenerateLuaBindings.cmake
  • Applied the macros for compiler flags, linker flags, header files and source groups Updated the whole build tree for that
  • Created real compiler config scripts (BuildConfigGCC.cmake and BuildConfigMSVC.cmake)
  • Large scale clean up in BuildConfig.cmake
  • You can now specify your own LibraryConfig and BuildConfig script via CMake Cache
  • Lots of small changes and fixes
  • 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
30  SET(ORXONOXS_SRC_FILES
31    GraphicsEngine.cc
32    objects/Camera.cc
33    CameraManager.cc
34  )
35
36  ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES})
37ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
38
39TARGET_LINK_LIBRARIES( orxonox
40  ${OGRE_LIBRARY}
41  ${CEGUI_LIBRARY}
42  ${LUA_LIBRARIES}
43  ${CEGUILUA_LIBRARY}
44  ogreceguirenderer_orxonox
45  tinyxml++_orxonox
46  tolua++_orxonox
47  util
48  core
49  #audio
50  network
51)
52
53# When using Visual Studio we want to use the output directory as working
54# directory and we also want to specify where the external dlls
55# (lua, ogre, etc.) are. The problem hereby is that these information cannot
56# be specified in CMake because they are not stored in the actual project file.
57# This workaround will create a configured *.vcproj.user file that holds the
58# right values. When starting the solution for the first time,
59# these get written to the *vcproj.yourPCname.yourname.user
60IF(MSVC)
61  IF(CMAKE_CL_64)
62    SET(MSVC_PLATFORM "x64")
63  ELSE(CMAKE_CL_64)
64    SET(MSVC_PLATFORM "Win32")
65  ENDIF(CMAKE_CL_64)
66  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
67ENDIF(MSVC)
68
69IF (NOT WIN32)
70  INSTALL(TARGETS orxonox RUNTIME DESTINATION bin)
71ENDIF (NOT WIN32)
Note: See TracBrowser for help on using the repository browser.