[84] | 1 | PROJECT(Orxonox) |
---|
| 2 | |
---|
| 3 | #set some global variables, which are use throughout the project |
---|
| 4 | |
---|
| 5 | #Create some verbose output |
---|
| 6 | SET(CMAKE_VERBOSE_MAKEFILE TRUE) |
---|
| 7 | |
---|
| 8 | #force-set the compile on tardis machines, as default points to g++-3.3 |
---|
| 9 | # only run this test on a lunix/unix machine |
---|
| 10 | IF (UNIX) |
---|
| 11 | FIND_PROGRAM(UNAME_CMD "uname" |
---|
| 12 | PATHS "/usr/bin /bin") |
---|
| 13 | IF(NOT UNAME_CMD) |
---|
| 14 | MESSAGE("Unable to find uname. Tardis-Check cannot be done.") |
---|
| 15 | ENDIF(NOT UNAME_CMD) |
---|
| 16 | EXECUTE_PROCESS( |
---|
| 17 | COMMAND "${UNAME_CMD}" "-n" |
---|
| 18 | RESULT_VARIABLE UNAME_RV |
---|
| 19 | ERROR_VARIABLE UNAME_EV |
---|
| 20 | OUTPUT_VARIABLE UNAME_OV) |
---|
| 21 | |
---|
| 22 | IF (NOT "${UNAME_RV}" STREQUAL "0") |
---|
| 23 | MESSAGE("ERROR: uname terminated unclean.") |
---|
| 24 | ENDIF (NOT "${UNAME_RV}" STREQUAL "0") |
---|
| 25 | # check wheter we are on a tardis machine |
---|
| 26 | IF ("${UNAME_OV}" MATCHES "tardis") |
---|
| 27 | SET (IS_TARDIS "tardis") |
---|
| 28 | ENDIF ("${UNAME_OV}" MATCHES "tardis") |
---|
| 29 | # 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") |
---|
| 33 | ENDIF(IS_TARDIS) |
---|
| 34 | ENDIF (UNIX) |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | #This sets where to look for "Find*.cmake" files |
---|
| 38 | SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
---|
| 39 | #Performs the search and sets the variables |
---|
| 40 | FIND_PACKAGE(OGRE) |
---|
| 41 | FIND_PACKAGE(OIS) |
---|
[137] | 42 | FIND_PACKAGE(CEGUI) |
---|
| 43 | FIND_PACKAGE(CEGUI_OGRE) |
---|
[84] | 44 | |
---|
| 45 | #Sets the search paths for the linking |
---|
[137] | 46 | LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR}) |
---|
[84] | 47 | #Sets the search path for include files |
---|
[142] | 48 | #INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} -I/usr/include/enet) |
---|
[137] | 49 | INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR}) |
---|
[84] | 50 | |
---|
| 51 | #add main source dir |
---|
| 52 | ADD_SUBDIRECTORY(src) |
---|
| 53 | |
---|
| 54 | |
---|