Changeset 2197
- Timestamp:
- Nov 12, 2008, 4:08:35 PM (16 years ago)
- Location:
- code/branches/buildsystem
- Files:
-
- 1 added
- 2 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem/CMakeLists.txt
r1999 r2197 3 3 CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR) 4 4 5 IF (COMMAND cmake_policy) 6 cmake_policy(SET CMP0003 NEW) 7 ENDIF (COMMAND cmake_policy) 8 9 # Allow for simple IF constructs (makes code a lot more readable) 10 #SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) 5 # TODO: Test CMake Modules without policy 6 #IF (COMMAND cmake_policy) 7 # cmake_policy(SET CMP0003 NEW) 8 #ENDIF (COMMAND cmake_policy) 11 9 12 10 # This sets where to look for modules (e.g. "Find*.cmake" files) 13 11 SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 14 12 15 # Check whether we are on a tardis box and set customizedpaths13 # Check for special include paths 16 14 INCLUDE(CheckTardis) 15 INCLUDE(CheckOrxonoxWinDeps) 17 16 18 ############## Testing options##################17 ################ Test options ################### 19 18 20 #OPTION(TESTING_ENABLED "Do you want to enable Testing")21 #IF (TESTING_ENABLED)22 #ENABLE_TESTING()23 #ENDIF(TESTING_ENABLED)24 # 25 #OPTION (NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")26 #OPTION (NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")19 OPTION(ENABLE_TESTS "Enable build tests.") 20 IF(ENABLE_TESTS) 21 ENABLE_TESTING() 22 ENDIF(ENABLE_TESTS) 23 24 OPTION(NETWORK_TESTING_ENABLED "Build network testing tools: i.e. chatclient chatserver and alike.") 25 OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Build dummyserver4 and dummyclient4.") 27 26 28 27 ########## Compiler/Linker options ############## … … 31 30 SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) 32 31 SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) 32 MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH) 33 33 34 # TODO: use CMake's options for build types 34 35 # Global compiler/linker flags. 35 36 SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb") … … 45 46 ############### Library finding ################# 46 47 47 # Uncomment the following line if you want the include and library paths to be shown48 # Alternatively use the "-D VERBOSE_FIND:BOOL=true" option when executing cmake49 50 # SET (VERBOSE_FIND true)51 52 # Set the library directory when using precompiled tarballs for the dependencies under windows53 IF (WIN32)54 IF (MSVC)55 IF ($ENV{ORXONOX_DEV})56 SET (DEPENDENCY_DIR ${CMAKE_SOURCE_DIR}/../lib_dist/dependencies/)57 ELSE ($ENV{ORXONOX_DEV})58 SET (DEPENDENCY_DIR ${CMAKE_SOURCE_DIR}/dependencies/)59 ENDIF ($ENV{ORXONOX_DEV})60 SET(Boost_LIB_SUFFIX_DEBUG vc80-mt-gd-1_35)61 #MESSAGE(STATUS ${DEPENDENCY_DIR})62 ENDIF (MSVC)63 ENDIF (WIN32)64 65 48 # Performs the search and sets the variables 66 49 FIND_PACKAGE(OGRE REQUIRED) … … 74 57 FIND_PACKAGE(OggVorbis REQUIRED) 75 58 FIND_PACKAGE(ZLIB REQUIRED) 59 #TODO: don't require the whole tcl stuff 76 60 FIND_PACKAGE(TCL REQUIRED) 77 61 FIND_PACKAGE(DirectX REQUIRED) -
code/branches/buildsystem/cmake/CheckTardis.cmake
r2061 r2197 45 45 SET(ENV{OGGVORBISDIR} "/usr/pack/oggvorbis-1.0-ds;/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0") 46 46 #SET(TCL_INCLUDE_PATH "/usr/pack/tcltk-8.4.9.linux-mo/include") 47 SET(ENV{CEGUIDIR} "/usr/pack/cegui-0.5.0-sd;/usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1") 47 48 ENDIF (IS_TARDIS) 49 50 MARK_AS_ADVANCED(UNAME_CMD IS_TARDIS) -
code/branches/buildsystem/cmake/FindCEGUI.cmake
r1872 r2197 3 3 # This module defines 4 4 # CEGUI_INCLUDE_DIR 5 # CEGUI_LIBRARIES, the libraries to link against to use CEGUI. 6 # CEGUI_LIB_DIR, the location of the libraries 5 # CEGUI_LIBRARY, the library to link against to use CEGUI. 7 6 # CEGUI_FOUND, If false, do not try to use CEGUI 8 7 # … … 17 16 # 18 17 # Several changes and additions by Fabian 'x3n' Landau 18 # Lots of simplifications by Adrian Friedli 19 19 # > www.orxonox.net < 20 20 21 IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES) 22 SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent 23 ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES) 21 # TODO: Determine CEGUI version 24 22 25 IF (WIN32) #Windows 26 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 27 ../libs/cegui-0.6.1/include 28 ${DEPENDENCY_DIR}/cegui-0.6.1/include 29 ) 23 FIND_PATH(CEGUI_INCLUDE_DIR CEGUI.h 24 PATHS 25 $ENV{CEGUIDIR} 26 /usr/local 27 /usr 28 PATH_SUFFIXES include include/CEGUI 29 ) 30 30 31 SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase) 32 FIND_LIBRARY(CEGUI_LIBDIR NAMES ${CEGUI_LIBRARIES} PATHS 33 ../libs/cegui-0.6.1/bin 34 ${DEPENDENCY_DIR}/cegui-0.6.1/lib 35 ) 36 37 # Strip the filename from the path 38 IF (CEGUI_LIBDIR) 39 GET_FILENAME_COMPONENT(CEGUI_LIBDIR ${CEGUI_LIBDIR} PATH) 40 SET (CEGUI_LIB_DIR ${CEGUI_LIBDIR} CACHE FILEPATH "") 41 ENDIF (CEGUI_LIBDIR) 31 #SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase) 32 FIND_LIBRARY(CEGUI_LIBRARY 33 NAMES CEGUIBase 34 PATHS 35 $ENV{CEGUIDIR} 36 /usr/local 37 /usr 38 PATH_SUFFIXES lib 39 ) 42 40 43 41 # IF (NOT CEGUI_SCRIPT_LIBDIR) … … 58 56 # ENDIF (NOT CEGUI_SCRIPT_LIBDIR) 59 57 60 # # Strip the filename from the path 61 # IF (CEGUI_SCRIPT_LIBDIR) 62 # GET_FILENAME_COMPONENT(CEGUI_SCRIPT_LIBDIR ${CEGUI_SCRIPT_LIBDIR} PATH) 63 # SET (CEGUI_SCRIPT_LIB_DIR ${CEGUI_SCRIPT_LIBDIR} CACHE FILEPATH "") 64 # ENDIF (CEGUI_SCRIPT_LIBDIR) 58 INCLUDE(FindPackageHandleStandardArgs) 59 FIND_PACKAGE_HANDLE_STANDARD_ARGS(CEGUI DEFAULT_MSG 60 CEGUI_LIBRARY 61 CEGUI_INCLUDE_DIR 62 #CEGUI_SCRIPT_LIBRARIES 63 ) 65 64 66 ELSE (WIN32) #Unix 67 FIND_PACKAGE(PkgConfig) 68 PKG_SEARCH_MODULE(CEGUI CEGUI /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI.pc) # tardis specific hack 69 SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS}) 70 SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR}) 71 SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "") 72 # SET(CEGUI_SCRIPT_LIBRARIES "CEGUILuaScriptModule") 73 # SET(CEGUI_SCRIPT_LIB_DIR) 74 ENDIF (WIN32) 75 76 IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES) 77 SET(CEGUI_FOUND TRUE) 78 79 #Do some preparation 80 SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR) 81 SEPARATE_ARGUMENTS(CEGUI_LIBRARIES) 82 83 SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "") 84 SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "") 85 SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "") 86 # SET(CEGUI_SCRIPT_LIBRARIES ${CEGUI_SCRIPT_LIBRARIES} CACHE PATH "") 87 ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES AND CEGUI_LIB_DIR)# AND CEGUI_SCRIPT_LIBRARIES) 88 89 IF (CEGUI_FOUND) 90 IF (NOT CEGUI_FIND_QUIETLY) 91 MESSAGE(STATUS "CEGUI was found.") 92 IF (VERBOSE_FIND) 93 MESSAGE (STATUS " include path: ${CEGUI_INCLUDE_DIR}") 94 MESSAGE (STATUS " library path: ${CEGUI_LIB_DIR}") 95 MESSAGE (STATUS " libraries: ${CEGUI_LIBRARIES}") 96 # MESSAGE (STATUS " : ${CEGUI_SCRIPT_LIBRARIES}") 97 ENDIF (VERBOSE_FIND) 98 ENDIF (NOT CEGUI_FIND_QUIETLY) 99 ELSE (CEGUI_FOUND) 100 IF (NOT CEGUI_INCLUDE_DIR) 101 MESSAGE(SEND_ERROR "CEGUI include path was not found.") 102 ENDIF (NOT CEGUI_INCLUDE_DIR) 103 IF (NOT CEGUI_LIB_DIR) 104 MESSAGE(SEND_ERROR "CEGUI library was not found.") 105 ENDIF (NOT CEGUI_LIB_DIR) 106 IF (NOT CEGUI_LIBRARIES) 107 MESSAGE(SEND_ERROR "CEGUI libraries not known.") 108 ENDIF (NOT CEGUI_LIBRARIES) 109 # IF (NOT CEGUI_SCRIPT_LIBRARIES) 110 # MESSAGE(SEND_ERROR "CEGUI Lua script module was not found.") 111 # ENDIF (NOT CEGUI_SCRIPT_LIBRARIES) 112 ENDIF (CEGUI_FOUND) 113 65 MARK_AS_ADVANCED( 66 CEGUI_LIBRARY 67 CEGUI_INCLUDE_DIR 68 #CEGUI_SCRIPT_LIBRARIES 69 ) -
code/branches/buildsystem/src/CMakeLists.txt
r2135 r2197 16 16 ) 17 17 18 # TODO: remove this after the CMake Modules have been fixed and use absolut paths 18 19 # Set the search paths for the linking 19 # TODO: remove this after the CMake Modules have been fixed and use absolut paths20 20 LINK_DIRECTORIES( 21 21 ${OGRE_LIB_DIR} 22 ${CEGUI_LIB_DIR}23 22 ) 24 23 … … 33 32 ADD_SUBDIRECTORY(ois) 34 33 ADD_SUBDIRECTORY(tinyxml) 35 #ADD_SUBDIRECTORY(lua)36 34 ADD_SUBDIRECTORY(tolua) 37 35 … … 46 44 INCLUDE_DIRECTORIES(ceguilua-0.6.1) 47 45 ELSE (WIN32) 48 IF (${CEGUI_VERSION} LESS 0.6.0) 46 # FIXME 47 #IF (${CEGUI_VERSION} LESS 0.6.0) 49 48 ADD_SUBDIRECTORY(ceguilua-0.5.0/ceguilua) 50 49 INCLUDE_DIRECTORIES(ceguilua-0.5.0) 51 ELSE (${CEGUI_VERSION} LESS 0.6.0)52 ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua)53 INCLUDE_DIRECTORIES(ceguilua-0.6.1)54 ENDIF (${CEGUI_VERSION} LESS 0.6.0)50 #ELSE (${CEGUI_VERSION} LESS 0.6.0) 51 # ADD_SUBDIRECTORY(ceguilua-0.6.1/ceguilua) 52 # INCLUDE_DIRECTORIES(ceguilua-0.6.1) 53 #ENDIF (${CEGUI_VERSION} LESS 0.6.0) 55 54 ENDIF (WIN32) 56 55 -
code/branches/buildsystem/src/ceguilua-0.5.0/ceguilua/CMakeLists.txt
r1980 r2197 11 11 tolualib_orxonox 12 12 ${LUA_LIBRARIES} 13 ${CEGUI_LIBRAR IES}13 ${CEGUI_LIBRARY} 14 14 ) -
code/branches/buildsystem/src/ceguilua-0.6.1/ceguilua/CMakeLists.txt
r1979 r2197 11 11 tolualib_orxonox 12 12 ${LUA_LIBRARIES} 13 ${CEGUI_LIBRAR IES}13 ${CEGUI_LIBRARY} 14 14 ) -
code/branches/buildsystem/src/orxonox/CMakeLists.txt
r1979 r2197 92 92 TARGET_LINK_LIBRARIES( orxonox 93 93 ${OGRE_LIBRARIES} 94 ${CEGUI_LIBRAR IES}94 ${CEGUI_LIBRARY} 95 95 ${LUA_LIBRARIES} 96 96 #${CEGUI_SCRIPT_LIBRARIES} -
code/branches/buildsystem/src/util/CMakeLists.txt
r1844 r2197 13 13 14 14 ADD_LIBRARY(util SHARED ${UTIL_SRC_FILES}) 15 TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARIES}) 15 16 16 IF(TESTING_ENABLED) 17 ADD_SUBDIRECTORY(testing) 18 ENDIF(TESTING_ENABLED) 19 20 TARGET_LINK_LIBRARIES(util 21 ${OGRE_LIBRARIES} 22 ) 17 ADD_SUBDIRECTORY(testing) -
code/branches/buildsystem/src/util/testing/CMakeLists.txt
r1505 r2197 1 INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} 2 ../ 3 ) 1 INCLUDE_DIRECTORIES(..) 4 2 5 ADD_EXECUTABLE(TestConverter 6 TestConverter.cpp7 )3 IF(ENABLE_TESTS) 4 ADD_EXECUTABLE(TestConverter TestConverter.cpp) 5 ENDIF(ENABLE_TESTS) 8 6 9 10 ADD_TEST(TestConverter 11 ${EXECUTABLE_OUTPUT_PATH}/TestConverter 12 ) 7 ADD_TEST(TestConverter ${EXECUTABLE_OUTPUT_PATH}/TestConverter)
Note: See TracChangeset
for help on using the changeset viewer.