Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem3/src/orxonox/CMakeLists.txt @ 2685

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

Fixed install target:

  • log and config file go a to separate folder each
  • The SignalHandler crash log is now "orxonox_crash.log" to avoid opening the file twice which might result in problems
  • moved tcl scripts to media/tcl8.#/ as a temporary solution. I've also created a ticket to fix this.
  • UPDATE YOUR MEDIA REPOSITORY
  • orxonox.log pre-main gets written to either %TEMP% (windows) or /tmp (Unix) and when the path was set, the content is copied.
  • removed Settings class and moved media path to Core
  • media, log and config path are now all in Core where only the media path can be configured via ini file or command line
  • Core::isDevBuild() tells whether we are running in the build or the installation directory (determined by the presence of "orxonox_dev_build.kepp_me" in the binary dir)
  • renamed Settings::getDataPath to Core::getMediaPath
  • Property svn:eol-style set to native
File size: 3.2 KB
Line 
1 #
2 #             ORXONOX - the hottest 3D action shooter ever to exist
3 #                             > www.orxonox.net <
4 #
5 #        This program is free software; you can redistribute it and/or
6 #         modify it under the terms of the GNU General Public License
7 #        as published by the Free Software Foundation; either version 2
8 #            of the License, or (at your option) any later version.
9 #
10 #       This program is distributed in the hope that it will be useful,
11 #        but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #                 GNU General Public License for more details.
14 #
15 #   You should have received a copy of the GNU General Public License along
16 #      with this program; if not, write to the Free Software Foundation,
17 #     Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 #
19
20SET_SOURCE_FILES(ORXONOX_SRC_FILES
21  CameraManager.cc
22  GraphicsEngine.cc
23  LevelManager.cc
24  Main.cc
25  PawnManager.cc
26  PlayerManager.cc
27)
28ADD_SUBDIRECTORY(gamestates)
29ADD_SUBDIRECTORY(gui)
30ADD_SUBDIRECTORY(objects)
31ADD_SUBDIRECTORY(overlays)
32ADD_SUBDIRECTORY(tools)
33GET_ALL_HEADER_FILES(ORXONOX_HDR_FILES)
34SET(ORXONOX_FILES ${ORXONOX_SRC_FILES} ${ORXONOX_HDR_FILES})
35
36GENERATE_SOURCE_GROUPS(${ORXONOX_FILES})
37GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h)
38
39# Not using precompiled header files: Avoid dependencies
40INCLUDE_DIRECTORIES(pch/nopch)
41
42IF(GCC_NO_SYSTEM_HEADER_SUPPORT)
43  # Get around displaying a few hundred lines of warning code
44  SET_SOURCE_FILES_PROPERTIES(
45    gamestates/GSGraphics.cc
46    gui/GUIManager.cc
47    PROPERTIES COMPILE_FLAGS "-Wno-sign-compare"
48  )
49ENDIF()
50
51ADD_EXECUTABLE(orxonox ${ORXONOX_FILES})
52GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION)
53GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
54SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
55
56IF(NETWORKTRAFFIC_TESTING_ENABLED)
57  SET(ORXONOXS_SRC_FILES
58    GraphicsEngine.cc
59    objects/Camera.cc
60    CameraManager.cc
61  )
62  ADD_LIBRARY(orxonoxs SHARED ${ORXONOXS_SRC_FILES})
63ENDIF(NETWORKTRAFFIC_TESTING_ENABLED)
64
65TARGET_LINK_LIBRARIES(orxonox
66  ${OGRE_LIBRARY}
67  ${CEGUI_LIBRARY}
68  ${LUA_LIBRARIES}
69  ${CEGUILUA_LIBRARY}
70  ${Boost_SYSTEM_LIBRARY}
71  ogreceguirenderer_orxonox
72  tinyxml++_orxonox
73  tolua++_orxonox
74  bullet_orxonox
75  util
76  core
77  network
78  #audio
79)
80
81ORXONOX_INSTALL(orxonox)
82
83
84# When using Visual Studio we want to use the output directory as working
85# directory and we also want to specify where the external dlls
86# (lua, ogre, etc.) are. The problem hereby is that these information cannot
87# be specified in CMake because they are not stored in the actual project file.
88# This workaround will create a configured *.vcproj.user file that holds the
89# right values. When starting the solution for the first time,
90# these get written to the *vcproj.yourPCname.yourname.user
91IF(MSVC)
92  IF(CMAKE_CL_64)
93    SET(MSVC_PLATFORM "x64")
94  ELSE()
95    SET(MSVC_PLATFORM "Win32")
96  ENDIF()
97  STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?) .*$" "\\1"
98         VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}")
99  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
100ENDIF(MSVC)
Note: See TracBrowser for help on using the repository browser.