Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/script_trigger/CMakeLists.txt @ 2045

Last change on this file since 2045 was 1293, checked in by scheusso, 17 years ago

merged changes from input & camera & network branch into trunk

File size: 2.8 KB
Line 
1PROJECT(Orxonox)
2
3cmake_minimum_required(VERSION 2.4)
4
5if(COMMAND cmake_policy)
6  cmake_policy(SET CMP0003 NEW)
7endif(COMMAND cmake_policy)
8
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
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")
24OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")
25
26
27########## Compiler/Linker options ##############
28
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)
39
40#set binary output directories
41SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
42SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/bin/lib)
43
44# global compiler/linker flags. force -O2!
45SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O0 -Wall -g -ggdb")
46SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
47SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
48SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
49SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
50SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
51
52#use 'cmake -D make_verb:1 path' to get verbose make output when compiling
53IF (MAKE_VERB)
54 SET(CMAKE_VERBOSE_MAKEFILE TRUE)
55ENDIF (MAKE_VERB)
56
57
58############### Library finding #################
59
60#Performs the search and sets the variables
61FIND_PACKAGE(OGRE)
62#FIND_PACKAGE(OIS)
63# FIND_PACKAGE(CEGUI)
64# FIND_PACKAGE(CEGUI_OGRE)
65FIND_PACKAGE(ENet)
66FIND_PACKAGE(Boost REQUIRED thread)
67FIND_PACKAGE(OpenAL)
68FIND_PACKAGE(ALUT)
69FIND_PACKAGE(OggVorbis)
70FIND_PACKAGE(ZLIB)
71FIND_PACKAGE(Lua)
72FIND_PACKAGE(TCL)
73
74#Set the search paths for the linking
75LINK_DIRECTORIES(
76  ${OGRE_LIB_DIR}
77#  ${OIS_LIB_DIR}
78#  ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR}
79  ${ENet_LIBRARY}
80  ${Boost_LIBRARY_DIRS}
81  ${Zlib_LIBRARY_DIR}
82  ${TCL_LIBRARY}
83)
84
85#Set the search paths for include files
86INCLUDE_DIRECTORIES(
87  ${OGRE_INCLUDE_DIR}
88#  ${OIS_INCLUDE_DIR}
89#  ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR}
90  ${ENet_INCLUDE_DIR}
91  ${Boost_INCLUDE_DIRS}
92  ${OPENAL_INCLUDE_DIR}
93  ${ALUT_INCLUDE_DIR}
94  ${VORBIS_INCLUDE_DIR}
95  ${OGG_INCLUDE_DIR}
96  ${Lua_INCLUDE_DIR}
97  ${TCL_INCLUDE_PATH}
98)
99
100#add main source dir
101ADD_SUBDIRECTORY(src)
102
Note: See TracBrowser for help on using the repository browser.