Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/camera/CMakeLists.txt @ 1565

Last change on this file since 1565 was 1211, checked in by scheusso, 17 years ago

merged trunk changes from 1101 to 1202 into camera branch

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