Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 462 was 462, checked in by bknecht, 16 years ago

got my work to compile (it's all hacked together and I dunno if it runs)

  • orxonox.h we got now a real .h file for our main class
  • orxonox.cc this is the all hacked class. We/I have to strip that clean
  • orxonoxOld.cc "You did something wrong, the old implementation was SOO much better"
  • graphicsEngine we should have a wrapper around ogre so we have a real graphics module
  • main.cc created a main again doing all the platform depending stuff in there.. (hope this works)

think that's all…

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