Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/CMakeLists.txt @ 731

Last change on this file since 731 was 728, checked in by nicolasc, 17 years ago
  • various cleanup
  • improved readability in PI
  • fixed iterator in language
File size: 2.6 KB
Line 
1PROJECT(Orxonox)
2#set some global variables, which are used throughout the project
3
4OPTION(TESTING_ENABLED "Do you want to enable Testing")
5IF (TESTING_ENABLED)
6ENABLE_TESTING()
7ENDIF(TESTING_ENABLED)
8
9#Create some verbose output
10SET(CMAKE_VERBOSE_MAKEFILE TRUE)
11
12# set boost search path
13SET(Boost_INCLUDE_DIR "/usr/include/boost/")
14
15# force-set the compile on tardis machines, as default points to g++-3.3
16# only run this test on a lunix/unix machine
17IF (UNIX)
18
19  FIND_PROGRAM(UNAME_CMD "uname"
20  PATHS "/usr/bin /bin")
21  IF(NOT UNAME_CMD)
22    MESSAGE("Unable to find uname. Tardis-Check cannot be done.")
23  ENDIF(NOT UNAME_CMD)
24
25  # run uname -n to get nodename
26  EXECUTE_PROCESS(
27  COMMAND "${UNAME_CMD}" "-n"
28  RESULT_VARIABLE UNAME_RV
29  ERROR_VARIABLE UNAME_EV
30  OUTPUT_VARIABLE UNAME_OV)
31
32  IF (NOT "${UNAME_RV}" STREQUAL "0")
33    MESSAGE("ERROR: uname terminated unclean.")
34  ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
35
36  # check wheter we are on a tardis machine
37  IF ("${UNAME_OV}" MATCHES "tardis")
38    SET (IS_TARDIS "tardis")
39  ENDIF ("${UNAME_OV}" MATCHES "tardis")
40
41  # if on tardis change compiler
42  IF (IS_TARDIS)
43    MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
44    SET(CMAKE_CXX_COMPILER "g++-4.1.1")
45    # reset eNet serach path
46    SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include")
47  ENDIF(IS_TARDIS)
48
49ENDIF (UNIX)
50
51# pipe $FLAGS to the compiler, and add some local flags. force -O2!
52#SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
53SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
54#SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
55SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
56SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
57
58
59#This sets where to look for "Find*.cmake" files
60SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
61#Performs the search and sets the variables
62FIND_PACKAGE(OGRE)
63FIND_PACKAGE(OIS)
64FIND_PACKAGE(CEGUI)
65FIND_PACKAGE(CEGUI_OGRE)
66FIND_PACKAGE(ENet)
67FIND_PACKAGE(Boost)
68FIND_PACKAGE(OpenAL)
69FIND_PACKAGE(ALUT)
70FIND_PACKAGE(OggVorbis)
71FIND_PACKAGE(ZLIB)
72
73#Sets the search paths for the linking
74LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${Boost_LIBRARY_DIRS} ${Zlib_LIBRARY_DIR} core objects loader network weapon classHierarchy audio)
75#Sets the search path for include files
76INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR})
77
78#add main source dir
79ADD_SUBDIRECTORY(src)
Note: See TracBrowser for help on using the repository browser.