Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 367 was 354, checked in by nicolasc, 17 years ago

removed all STATIC flags — according to besch it's worth it
some minor changes in root-CML

File size: 2.1 KB
Line 
1PROJECT(Orxonox)
2#set some global variables, which are use throughout the project
3
4#Create some verbose output
5SET(CMAKE_VERBOSE_MAKEFILE TRUE)
6
7# set eNet search path
8SET(Boost_INCLUDE_DIR "/usr/include/boost/")
9
10# force-set the compile on tardis machines, as default points to g++-3.3
11# only run this test on a lunix/unix machine
12IF (UNIX)
13
14  FIND_PROGRAM(UNAME_CMD "uname"
15  PATHS "/usr/bin /bin")
16  IF(NOT UNAME_CMD)
17    MESSAGE("Unable to find uname. Tardis-Check cannot be done.")
18  ENDIF(NOT UNAME_CMD)
19
20  # run uname -n to get nodename
21  EXECUTE_PROCESS(
22  COMMAND "${UNAME_CMD}" "-n"
23  RESULT_VARIABLE UNAME_RV
24  ERROR_VARIABLE UNAME_EV
25  OUTPUT_VARIABLE UNAME_OV)
26
27  IF (NOT "${UNAME_RV}" STREQUAL "0")
28    MESSAGE("ERROR: uname terminated unclean.")
29  ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
30
31  # check wheter we are on a tardis machine
32  IF ("${UNAME_OV}" MATCHES "tardis")
33    SET (IS_TARDIS "tardis")
34  ENDIF ("${UNAME_OV}" MATCHES "tardis")
35
36  # if on tardis change compiler
37  IF (IS_TARDIS)
38    MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
39    SET(CMAKE_CXX_COMPILER "g++-4.1.1")
40    # reset eNet serach path
41    SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include/boost-1_34_1")
42  ENDIF(IS_TARDIS)
43
44ENDIF (UNIX)
45
46
47#This sets where to look for "Find*.cmake" files
48SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
49# SET(BOOST_LIBDIR /usr/pack/boost-1.33.1-mo/i686-debian-linux3.1/lib/)
50# SET(BOOST_INCDIR /usr/pack/boost-1.33.1-mo/i686-debian-linux3.1/include/)
51
52#Performs the search and sets the variables
53FIND_PACKAGE(OGRE)
54FIND_PACKAGE(OIS)
55FIND_PACKAGE(CEGUI)
56FIND_PACKAGE(CEGUI_OGRE)
57FIND_PACKAGE(ENet)
58FIND_PACKAGE(Boost)
59
60#Sets the search paths for the linking
61LINK_DIRECTORIES(
62        ${OGRE_LIB_DIR}
63        ${OIS_LIB_DIR}
64        ${CEGUI_LIB_DIR}
65        ${CEGUI_OGRE_LIB_DIR}
66        ${ENet_LIBRARY}
67        ${Boost_LIBRARY_DIRS}
68)
69
70#Sets the search path for include files
71INCLUDE_DIRECTORIES(
72        ${OGRE_INCLUDE_DIR}
73        ${OIS_INCLUDE_DIR}
74        ${CEGUI_INCLUDE_DIR}
75        ${CEGUI_OGRE_INCLUDE_DIR}
76        ${ENet_INCLUDE_DIR}
77        ${Boost_INCLUDE_DIRS}
78)
79
80
81#add main source dir
82ADD_SUBDIRECTORY(src)
Note: See TracBrowser for help on using the repository browser.