Changeset 790 for code/trunk/CMakeLists.txt
- Timestamp:
- Feb 7, 2008, 5:01:44 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
Property
svn:ignore
set to
dependencies
-
Property
svn:ignore
set to
-
code/trunk/CMakeLists.txt
r142 r790 1 1 PROJECT(Orxonox) 2 #set some global variables, which are used throughout the project 3 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) 4 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/lib) 2 5 3 #set some global variables, which are use throughout the project 6 OPTION(TESTING_ENABLED "Do you want to enable Testing") 7 IF (TESTING_ENABLED) 8 ENABLE_TESTING() 9 ENDIF(TESTING_ENABLED) 10 11 OPTION(NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike") 4 12 5 13 #Create some verbose output 6 14 SET(CMAKE_VERBOSE_MAKEFILE TRUE) 7 15 8 #force-set the compile on tardis machines, as default points to g++-3.3 16 # set boost search path 17 SET(Boost_INCLUDE_DIR "/usr/include/boost/") 18 19 # force-set the compile on tardis machines, as default points to g++-3.3 9 20 # only run this test on a lunix/unix machine 10 21 IF (UNIX) 22 11 23 FIND_PROGRAM(UNAME_CMD "uname" 12 24 PATHS "/usr/bin /bin") 13 25 IF(NOT UNAME_CMD) 14 MESSAGE("Unable to find uname. Tardis-Check cannot be done.")26 MESSAGE(ERROR "Unable to find uname. Tardis-Check cannot be done.") 15 27 ENDIF(NOT UNAME_CMD) 28 29 # run uname -n to get nodename 16 30 EXECUTE_PROCESS( 17 18 19 20 31 COMMAND "${UNAME_CMD}" "-n" 32 RESULT_VARIABLE UNAME_RV 33 ERROR_VARIABLE UNAME_EV 34 OUTPUT_VARIABLE UNAME_OV) 21 35 22 36 IF (NOT "${UNAME_RV}" STREQUAL "0") 23 MESSAGE("ERROR: uname terminated unclean.")37 MESSAGE(ERROR "ERROR: uname terminated unclean.") 24 38 ENDIF (NOT "${UNAME_RV}" STREQUAL "0") 39 25 40 # check wheter we are on a tardis machine 26 41 IF ("${UNAME_OV}" MATCHES "tardis") 27 SET (IS_TARDIS "tardis")42 SET (IS_TARDIS ON) 28 43 ENDIF ("${UNAME_OV}" MATCHES "tardis") 44 29 45 # if on tardis change compiler 30 IF (IS_TARDIS) 31 MESSAGE("System is a TARDIS: Setting Compiler to g++-3.4.3") 32 SET(CMAKE_CXX_COMPILER "g++-3.4.3") 46 IF(IS_TARDIS) 47 MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1") 48 SET(CMAKE_CXX_COMPILER "g++-4.1.1") 49 # reset Boost serach path 50 SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include") 33 51 ENDIF(IS_TARDIS) 52 34 53 ENDIF (UNIX) 35 54 55 # pipe $FLAGS to the compiler, and add some local flags. force -O2! 56 SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb") 57 SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb") 58 SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}") 36 59 37 60 #This sets where to look for "Find*.cmake" files … … 40 63 FIND_PACKAGE(OGRE) 41 64 FIND_PACKAGE(OIS) 42 FIND_PACKAGE(CEGUI) 43 FIND_PACKAGE(CEGUI_OGRE) 65 # FIND_PACKAGE(CEGUI) 66 # FIND_PACKAGE(CEGUI_OGRE) 67 FIND_PACKAGE(ENet) 68 FIND_PACKAGE(Boost REQUIRED thread) 69 FIND_PACKAGE(OpenAL) 70 FIND_PACKAGE(ALUT) 71 FIND_PACKAGE(OggVorbis) 72 FIND_PACKAGE(ZLIB) 44 73 45 74 #Sets the search paths for the linking 46 LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} )75 LINK_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) 47 76 #Sets the search path for include files 48 #INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} -I/usr/include/enet) 49 INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR}) 77 INCLUDE_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}) 78 79 #Set the execution directory 50 80 51 81 #add main source dir 52 82 ADD_SUBDIRECTORY(src) 53 54
Note: See TracChangeset
for help on using the changeset viewer.