Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 379 was 376, checked in by rgrieder, 17 years ago
  • removed the linker flags, since —no-undefined has no influence when building shared libraries (sorry Nico for you efforts) —no-allow-shlib-undefined should exist, but doesn't according to the man page, and it also doesn't work anyway.
  • removed linkage of ENet to the main executable as well (not necessary)
File size: 2.0 KB
RevLine 
[341]1PROJECT(Orxonox)
[376]2#set some global variables, which are used throughout the project
[341]3
4#Create some verbose output
5SET(CMAKE_VERBOSE_MAKEFILE TRUE)
6
[376]7# set boost search path
[341]8SET(Boost_INCLUDE_DIR "/usr/include/boost/")
9
[354]10# force-set the compile on tardis machines, as default points to g++-3.3
[341]11# only run this test on a lunix/unix machine
12IF (UNIX)
[354]13
[341]14  FIND_PROGRAM(UNAME_CMD "uname"
[354]15  PATHS "/usr/bin /bin")
[341]16  IF(NOT UNAME_CMD)
[354]17    MESSAGE("Unable to find uname. Tardis-Check cannot be done.")
[341]18  ENDIF(NOT UNAME_CMD)
[354]19
20  # run uname -n to get nodename
[341]21  EXECUTE_PROCESS(
[354]22  COMMAND "${UNAME_CMD}" "-n"
23  RESULT_VARIABLE UNAME_RV
24  ERROR_VARIABLE UNAME_EV
25  OUTPUT_VARIABLE UNAME_OV)
[341]26
27  IF (NOT "${UNAME_RV}" STREQUAL "0")
[354]28    MESSAGE("ERROR: uname terminated unclean.")
[341]29  ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
[354]30
31  # check wheter we are on a tardis machine
[341]32  IF ("${UNAME_OV}" MATCHES "tardis")
33    SET (IS_TARDIS "tardis")
34  ENDIF ("${UNAME_OV}" MATCHES "tardis")
[354]35
[341]36  # if on tardis change compiler
37  IF (IS_TARDIS)
[354]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
[371]41    SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include/boost-1_34_1")
[341]42  ENDIF(IS_TARDIS)
[354]43
[341]44ENDIF (UNIX)
45
46
47#This sets where to look for "Find*.cmake" files
48SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
49
50#Performs the search and sets the variables
51FIND_PACKAGE(OGRE)
52FIND_PACKAGE(OIS)
53FIND_PACKAGE(CEGUI)
54FIND_PACKAGE(CEGUI_OGRE)
55FIND_PACKAGE(ENet)
56FIND_PACKAGE(Boost)
57
[376]58#Sets the search paths for the linker
[341]59LINK_DIRECTORIES(
[376]60  ${OGRE_LIB_DIR}
61  ${OIS_LIB_DIR}
62  ${CEGUI_LIB_DIR}
63  ${CEGUI_OGRE_LIB_DIR}
64  ${ENet_LIBRARY}
65  ${Boost_LIBRARY_DIRS}
[341]66)
67
68#Sets the search path for include files
69INCLUDE_DIRECTORIES(
[376]70  ${OGRE_INCLUDE_DIR}
71  ${OIS_INCLUDE_DIR}
72  ${CEGUI_INCLUDE_DIR}
73  ${CEGUI_OGRE_INCLUDE_DIR}
74  ${ENet_INCLUDE_DIR}
75  ${Boost_INCLUDE_DIRS}
[341]76)
77
78
79#add main source dir
80ADD_SUBDIRECTORY(src)
Note: See TracBrowser for help on using the repository browser.