Changeset 1071 for code/trunk
- Timestamp:
- Apr 15, 2008, 1:40:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/CMakeLists.txt
r1070 r1071 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 3 #This sets where to look for modules (e.g. "Find*.cmake" files) 4 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 5 6 #Check whether we are on a tardis box 7 INCLUDE(CheckTardis) 8 9 10 ############## Testing options ################## 5 11 6 12 OPTION(TESTING_ENABLED "Do you want to enable Testing") … … 11 17 OPTION(NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike") 12 18 13 #Create some verbose output14 SET(CMAKE_VERBOSE_MAKEFILE TRUE)15 19 16 # set boost search path 17 SET(Boost_INCLUDE_DIR "/usr/include/boost/") 20 ########## Compiler/Linker options ############## 18 21 19 # force-set the compile on tardis machines, as default points to g++-3.3 20 # only run this test on a lunix/unix machine 21 IF (UNIX) 22 # if on tardis change compiler and reset boost include directory 23 IF(IS_TARDIS) 24 MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1") 25 # force-set the compiler on tardis machines, as default points to g++-3.3 26 SET(CMAKE_CXX_COMPILER "g++-4.1.1") 27 # reset Boost serach path 28 SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include") 29 ELSE (IS_TARDIS) 30 SET(Boost_INCLUDE_DIR "/usr/include/boost") 31 ENDIF(IS_TARDIS) 22 32 23 FIND_PROGRAM(UNAME_CMD "uname" 24 PATHS "/usr/bin /bin") 25 IF(NOT UNAME_CMD) 26 MESSAGE(ERROR "Unable to find uname. Tardis-Check cannot be done.") 27 ENDIF(NOT UNAME_CMD) 33 #set binary output directories 34 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) 35 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/lib) 28 36 29 # run uname -n to get nodename 30 EXECUTE_PROCESS( 31 COMMAND "${UNAME_CMD}" "-n" 32 RESULT_VARIABLE UNAME_RV 33 ERROR_VARIABLE UNAME_EV 34 OUTPUT_VARIABLE UNAME_OV) 35 36 IF (NOT "${UNAME_RV}" STREQUAL "0") 37 MESSAGE(ERROR "ERROR: uname terminated unclean.") 38 ENDIF (NOT "${UNAME_RV}" STREQUAL "0") 39 40 # check wheter we are on a tardis machine 41 IF ("${UNAME_OV}" MATCHES "tardis") 42 SET (IS_TARDIS ON) 43 ENDIF ("${UNAME_OV}" MATCHES "tardis") 44 45 # if on tardis change compiler 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") 51 ENDIF(IS_TARDIS) 52 53 ENDIF (UNIX) 54 55 # pipe $FLAGS to the compiler, and add some local flags. force -O2! 37 # global compiler/linker flags. force -O2! 56 38 SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb") 57 39 SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb") … … 59 41 SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined") 60 42 SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined") 61 #SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")43 SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined") 62 44 63 #This sets where to look for "Find*.cmake" files 64 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 45 #Create verbose makefile output when compiling 46 SET(CMAKE_VERBOSE_MAKEFILE TRUE) 47 48 49 ############### Library finding ################# 50 65 51 #Performs the search and sets the variables 66 52 FIND_PACKAGE(OGRE) … … 76 62 FIND_PACKAGE(Lua) 77 63 78 #Set sthe search paths for the linking64 #Set the search paths for the linking 79 65 LINK_DIRECTORIES( 80 66 ${OGRE_LIB_DIR} 81 67 ${OIS_LIB_DIR} 82 ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR}68 # ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} 83 69 ${ENet_LIBRARY} 84 70 ${Boost_LIBRARY_DIRS} … … 88 74 ) 89 75 90 #Set s the search pathfor include files76 #Set the search paths for include files 91 77 INCLUDE_DIRECTORIES( 92 78 ${OGRE_INCLUDE_DIR} 93 79 ${OIS_INCLUDE_DIR} 94 ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR}80 # ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} 95 81 ${ENet_INCLUDE_DIR} 96 82 ${Boost_INCLUDE_DIRS} 97 ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR}83 # ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR} 98 84 ${Lua_INCLUDE_DIR} 99 85 ) 100 86 101 #Set the execution directory 87 88 ################ Source files ################### 102 89 103 90 #add main source dir
Note: See TracChangeset
for help on using the changeset viewer.