Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/CMakeLists.txt @ 1448

Last change on this file since 1448 was 1446, checked in by landauf, 17 years ago

merged console branch into network branch

after several heavy troubles it compiles, but there is still a bug I couldn't fix: orxonox crashes as soon as one presses a key after opening the console… maybe someone else sees the problem?

File size: 3.0 KB
RevLine 
[790]1PROJECT(Orxonox)
2
[1214]3cmake_minimum_required(VERSION 2.4)
4
5if(COMMAND cmake_policy)
6  cmake_policy(SET CMP0003 NEW)
7endif(COMMAND cmake_policy)
8
[1071]9#This sets where to look for modules (e.g. "Find*.cmake" files)
10SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
11
12#Check whether we are on a tardis box
13INCLUDE(CheckTardis)
14
15
16############## Testing options ##################
17
[790]18OPTION(TESTING_ENABLED "Do you want to enable Testing")
19IF (TESTING_ENABLED)
20  ENABLE_TESTING()
21ENDIF(TESTING_ENABLED)
22
23OPTION(NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")
[1293]24OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")
[790]25
26
[1071]27########## Compiler/Linker options ##############
[790]28
[1071]29# if on tardis change compiler and reset boost include directory
30IF(IS_TARDIS)
31  MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
32  # force-set the compiler on tardis machines, as default points to g++-3.3
33  SET(CMAKE_CXX_COMPILER "g++-4.1.1")
34  # reset Boost serach path
35  SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include")
36ELSE (IS_TARDIS)
37  SET(Boost_INCLUDE_DIR "/usr/include/boost")
38ENDIF(IS_TARDIS)
[790]39
[1071]40#set binary output directories
[1126]41SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
42SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/bin/lib)
[790]43
[1071]44# global compiler/linker flags. force -O2!
[1293]45SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O0 -Wall -g -ggdb")
46SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
[1415]47#SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3")
48#SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
49
[790]50SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
[1070]51SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
52SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
[1071]53SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
[790]54
[1126]55#use 'cmake -D make_verb:1 path' to get verbose make output when compiling
56IF (MAKE_VERB)
57 SET(CMAKE_VERBOSE_MAKEFILE TRUE)
58ENDIF (MAKE_VERB)
[1071]59
60
61############### Library finding #################
62
[790]63#Performs the search and sets the variables
64FIND_PACKAGE(OGRE)
[1219]65#FIND_PACKAGE(OIS)
[790]66# FIND_PACKAGE(CEGUI)
67# FIND_PACKAGE(CEGUI_OGRE)
68FIND_PACKAGE(ENet)
[1085]69FIND_PACKAGE(Boost REQUIRED thread)
[1446]70FIND_PACKAGE(Boost REQUIRED filesystem)
[790]71FIND_PACKAGE(OpenAL)
72FIND_PACKAGE(ALUT)
73FIND_PACKAGE(OggVorbis)
[1070]74FIND_PACKAGE(ZLIB)
75FIND_PACKAGE(Lua)
[1214]76FIND_PACKAGE(TCL)
[1445]77FIND_PACKAGE(DirectX)
[790]78
[1071]79#Set the search paths for the linking
[1070]80LINK_DIRECTORIES(
81  ${OGRE_LIB_DIR}
[1219]82#  ${OIS_LIB_DIR}
[1071]83#  ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR}
[1070]84  ${ENet_LIBRARY}
85  ${Boost_LIBRARY_DIRS}
86  ${Zlib_LIBRARY_DIR}
[1214]87  ${TCL_LIBRARY}
[1070]88)
89
[1071]90#Set the search paths for include files
[1070]91INCLUDE_DIRECTORIES(
92  ${OGRE_INCLUDE_DIR}
[1219]93#  ${OIS_INCLUDE_DIR}
[1071]94#  ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR}
[1070]95  ${ENet_INCLUDE_DIR}
96  ${Boost_INCLUDE_DIRS}
[1115]97  ${OPENAL_INCLUDE_DIR}
98  ${ALUT_INCLUDE_DIR}
99  ${VORBIS_INCLUDE_DIR}
100  ${OGG_INCLUDE_DIR}
[1070]101  ${Lua_INCLUDE_DIR}
[1214]102  ${TCL_INCLUDE_PATH}
[1445]103  ${DirectX_INCLUDE_DIR}
104  ${ZLIB_INCLUDE_DIR}
[1070]105)
[790]106
107#add main source dir
108ADD_SUBDIRECTORY(src)
[1076]109
Note: See TracBrowser for help on using the repository browser.