Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/mainloop/src/CMakeLists.txt @ 78

Last change on this file since 78 was 76, checked in by nicolasc, 17 years ago

massive addon of needed files, run-script, but NO media

File size: 1.7 KB
Line 
1PROJECT(Tutorial)
2
3#Create some verbose output
4SET(CMAKE_VERBOSE_MAKEFILE TRUE)
5
6#force-set the compile on tardis machines, as default points to g++-3.3
7# only run this test on a lunix/unix machine
8IF (UNIX)
9  FIND_PROGRAM(UNAME_CMD "uname"
10        PATHS "/usr/bin /bin")
11  IF(NOT UNAME_CMD)
12        MESSAGE("Unable to find uname. Tardis-Check cannot be done.")
13  ENDIF(NOT UNAME_CMD)
14  EXECUTE_PROCESS(
15        COMMAND "${UNAME_CMD}" "-n"
16        RESULT_VARIABLE UNAME_RV
17        ERROR_VARIABLE UNAME_EV
18        OUTPUT_VARIABLE UNAME_OV)
19#MESSAGE("Print: UNAME_RV ${UNAME_RV}")
20  IF (NOT "${UNAME_RV}" STREQUAL "0")
21        MESSAGE("ERROR: uname terminated unclean.")
22  ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
23  # check wheter we are on a tardis machine
24  IF ("${UNAME_OV}" MATCHES "tardis")
25    SET (IS_TARDIS "tardis")
26  ENDIF ("${UNAME_OV}" MATCHES "tardis")
27  # if on tardis change compiler
28  IF (IS_TARDIS)
29  MESSAGE("System is a TARDIS: Setting Compiler to g++-3.4.3")
30  SET(CMAKE_CXX_COMPILER "g++-3.4.3")
31  ENDIF(IS_TARDIS)
32ENDIF (UNIX)
33
34# create a few variables to simplify life
35SET(SRC_FILES orxonox.cc)
36SET(INC_FILES ExampleApplication.h  ExampleFrameListener.h  ExampleLoadingBar.h)
37
38#This sets where to look for "Find*.cmake" files
39SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
40#Performs the search and sets the variables
41FIND_PACKAGE(OGRE)
42FIND_PACKAGE(OIS)
43
44#Sets the search paths for the linking
45LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR})
46#Sets the search path for include files
47INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR})
48
49#Creates an executable
50ADD_EXECUTABLE(bin/main ${SRC_FILES} ${INC_FILES})
51#Links the executable against OGRE and OIS
52TARGET_LINK_LIBRARIES(bin/main ${OGRE_LIBRARIES} ${OIS_LIBRARIES})
53
Note: See TracBrowser for help on using the repository browser.