Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2215 was 2204, checked in by adrfried, 16 years ago

don't require all tcl stuff

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
1PROJECT(Orxonox)
2
3CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
4
5# TODO: Test CMake Modules without policy
6#IF (COMMAND cmake_policy)
7#  cmake_policy(SET CMP0003 NEW)
8#ENDIF (COMMAND cmake_policy)
9
10# This sets where to look for modules (e.g. "Find*.cmake" files)
11SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
12
13# Check for special include paths
14INCLUDE(CheckTardis)
15INCLUDE(CheckOrxonoxWinDeps)
16
17################ Test options ###################
18
19OPTION(ENABLE_TESTS "Enable build tests.")
20IF(ENABLE_TESTS)
21  ENABLE_TESTING()
22ENDIF(ENABLE_TESTS)
23
24OPTION(NETWORK_TESTING_ENABLED "Build network testing tools: i.e. chatclient chatserver and alike.")
25OPTION(NETWORKTRAFFIC_TESTING_ENABLED "Build dummyserver4 and dummyclient4.")
26
27########## Compiler/Linker options ##############
28
29# Set binary output directories
30SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
31SET(LIBRARY_OUTPUT_PATH    ${PROJECT_BINARY_DIR}/bin)
32MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
33
34# TODO: use CMake's options for build types
35# Global compiler/linker flags.
36SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb")
37SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb")
38#SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3")
39#SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
40
41SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
42SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
43SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
44SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
45
46############### Library finding #################
47
48# Performs the search and sets the variables
49FIND_PACKAGE(OGRE REQUIRED)
50FIND_PACKAGE(CEGUI REQUIRED)
51# CEGUI_OGRE included in source
52#FIND_PACKAGE(CEGUI_OGRE REQUIRED)
53FIND_PACKAGE(ENet REQUIRED)
54FIND_PACKAGE(Boost 1.34 REQUIRED thread filesystem)
55FIND_PACKAGE(OpenAL REQUIRED)
56FIND_PACKAGE(ALUT REQUIRED)
57FIND_PACKAGE(OggVorbis REQUIRED)
58FIND_PACKAGE(ZLIB REQUIRED)
59FIND_PACKAGE(DirectX REQUIRED)
60FIND_PACKAGE(Lua50 REQUIRED)
61#FIND_PACKAGE(Lua51 QUIET)
62
63#don't require the whole tcl rat tail
64FIND_PACKAGE(TCL QUIET)
65IF(NOT TCL_FOUND)
66    MESSAGE(FATAL_ERROR "Tcl not found.")
67ENDIF(NOT TCL_FOUND)
68
69# Add main source dir
70ADD_SUBDIRECTORY(src)
71ADD_SUBDIRECTORY(bin)
Note: See TracBrowser for help on using the repository browser.