Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem/CMakeLists.txt @ 2117

Last change on this file since 2117 was 1999, checked in by adrfried, 16 years ago

works on tardis again, finally

  • Property svn:eol-style set to native
File size: 2.7 KB
Line 
1PROJECT(Orxonox)
2
3CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
4
5IF (COMMAND cmake_policy)
6  cmake_policy(SET CMP0003 NEW)
7ENDIF (COMMAND cmake_policy)
8
9# Allow for simple IF constructs (makes code a lot more readable)
10#SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
11
12# This sets where to look for modules (e.g. "Find*.cmake" files)
13SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
14
15# Check whether we are on a tardis box and set customized paths
16INCLUDE(CheckTardis)
17
18############## Testing options ##################
19
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")
27
28########## Compiler/Linker options ##############
29
30# Set binary output directories
31SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
32SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin)
33
34# Global compiler/linker flags.
35SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb")
36SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb")
37#SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3")
38#SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
39
40SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
41SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
42SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
43SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
44
45############### Library finding #################
46
47# Uncomment the following line if you want the include and library paths to be shown
48# Alternatively use the "-D VERBOSE_FIND:BOOL=true" option when executing cmake
49
50# SET (VERBOSE_FIND true)
51
52# Set the library directory when using precompiled tarballs for the dependencies under windows
53IF (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)
63ENDIF (WIN32)
64
65# Performs the search and sets the variables
66FIND_PACKAGE(OGRE REQUIRED)
67FIND_PACKAGE(CEGUI REQUIRED)
68# CEGUI_OGRE included in source
69#FIND_PACKAGE(CEGUI_OGRE REQUIRED)
70FIND_PACKAGE(ENet REQUIRED)
71FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem)
72FIND_PACKAGE(OpenAL REQUIRED)
73FIND_PACKAGE(ALUT REQUIRED)
74FIND_PACKAGE(OggVorbis REQUIRED)
75FIND_PACKAGE(ZLIB REQUIRED)
76FIND_PACKAGE(TCL REQUIRED)
77FIND_PACKAGE(DirectX REQUIRED)
78FIND_PACKAGE(Lua50 REQUIRED)
79#FIND_PACKAGE(Lua51 QUIET)
80
81# Add main source dir
82ADD_SUBDIRECTORY(src)
Note: See TracBrowser for help on using the repository browser.