Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/libraries2/src/orxonox/CMakeLists.txt @ 5732

Last change on this file since 5732 was 5732, checked in by landauf, 15 years ago

moved InGameConsole and Map into the overlays folder

  • Property svn:eol-style set to native
File size: 3.1 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  Main.cc
22
23  CameraManager.cc
24  LevelManager.cc
25  PawnManager.cc
26  PlayerManager.cc
27)
28ADD_SUBDIRECTORY(interfaces)
29ADD_SUBDIRECTORY(overlays)
30ADD_SUBDIRECTORY(objects)
31ADD_SUBDIRECTORY(sound)
32
33# Translate argument
34IF(ORXONOX_USE_WINMAIN)
35  SET(ORXONOX_WIN32 WIN32)
36ENDIF()
37
38ORXONOX_ADD_LIBRARY(orxonox
39  FIND_HEADER_FILES
40  TOLUA_FILES
41    LevelManager.h
42    objects/pickup/BaseItem.h
43    objects/pickup/PickupInventory.h
44  DEFINE_SYMBOL
45    "ORXONOX_SHARED_BUILD"
46  PCH_FILE
47    OrxonoxPrecompiledHeaders.h
48  LINK_LIBRARIES
49    ${Boost_FILESYSTEM_LIBRARY}
50    ${Boost_SYSTEM_LIBRARY} # Filesystem dependency
51    ${Boost_THREAD_LIBRARY}
52    ${Boost_DATE_TIME_LIBRARY} # Thread dependency
53    ${OGRE_LIBRARY}
54    ${OPENAL_LIBRARY}
55    ${ALUT_LIBRARY}
56    ${VORBISFILE_LIBRARY}
57    ${VORBIS_LIBRARY}
58    ${OGG_LIBRARY}
59    tinyxml++_orxonox
60    tolua++_orxonox
61    bullet_orxonox
62    util
63    core
64    network
65    tools
66  SOURCE_FILES ${ORXONOX_SRC_FILES}
67)
68
69ORXONOX_ADD_EXECUTABLE(orxonox-main
70  # When defined as WIN32 this removes the console window on Windows
71  ${ORXONOX_WIN32}
72  LINK_LIBRARIES
73    orxonox
74  SOURCE_FILES
75    Orxonox.cc
76  OUTPUT_NAME orxonox
77)
78
79GET_TARGET_PROPERTY(_exec_loc orxonox-main LOCATION)
80GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
81SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
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-main.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/orxonox-main.vcproj.user")
100ENDIF(MSVC)
Note: See TracBrowser for help on using the repository browser.