Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ceguilua/CMakeLists.txt @ 1980

Last change on this file since 1980 was 1804, checked in by rgrieder, 16 years ago

Implemented lua and ceguilua as far as it works now with visual studio. Next (not so big) step is to integrate it in CMake (already did the most part).

  • Property svn:eol-style set to native
File size: 3.1 KB
RevLine 
[1505]1PROJECT(Orxonox)
2
3cmake_minimum_required(VERSION 2.4)
4
[1776]5IF (COMMAND cmake_policy)
[1505]6  cmake_policy(SET CMP0003 NEW)
[1776]7ENDIF (COMMAND cmake_policy)
[1505]8
[1776]9# This sets where to look for modules (e.g. "Find*.cmake" files)
[1505]10SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
11
[1776]12# Check whether we are on a tardis box
[1505]13INCLUDE(CheckTardis)
14
15
16############## Testing options ##################
17
18OPTION(TESTING_ENABLED "Do you want to enable Testing")
19IF (TESTING_ENABLED)
20  ENABLE_TESTING()
21ENDIF(TESTING_ENABLED)
22
[1776]23OPTION (NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")
24OPTION (NETWORKTRAFFIC_TESTING_ENABLED "Do you want to build dummyserver4 and dummyclient4")
[1505]25
26
27########## Compiler/Linker options ##############
28
29# if on tardis change compiler and reset boost include directory
30IF(IS_TARDIS)
31  MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
[1776]32  # Force-set the compiler on tardis machines, as default points to g++-3.3
[1505]33  SET(CMAKE_CXX_COMPILER "g++-4.1.1")
[1776]34  # Reset Boost serach path
[1505]35  SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include")
36ELSE (IS_TARDIS)
[1776]37  IF (NOT WIN32)
38    SET(Boost_INCLUDE_DIR "/usr/include/boost")
39  ENDIF (NOT WIN32)
[1505]40ENDIF(IS_TARDIS)
41
[1776]42# Set binary output directories
[1505]43SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
44SET(LIBRARY_OUTPUT_PATH    ${PROJECT_SOURCE_DIR}/bin/lib)
45
[1776]46# Global compiler/linker flags. force -O2!
[1505]47SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O0 -Wall -g -ggdb")
48SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
49#SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3")
50#SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
51
52SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
53SET(CMAKE_EXE_LINKER_FLAGS " --no-undefined")
54SET(CMAKE_SHARED_LINKER_FLAGS " --no-undefined")
55SET(CMAKE_MODULE_LINKER_FLAGS " --no-undefined")
56
[1776]57# Use 'cmake -D make_verb:1 path' to get verbose make output when compiling
[1505]58IF (MAKE_VERB)
59 SET(CMAKE_VERBOSE_MAKEFILE TRUE)
60ENDIF (MAKE_VERB)
61
62
63############### Library finding #################
64
[1776]65# Uncomment the following line if you want the include and library paths to be shown
66# Alternatively use the "-D VERBOSE_FIND:BOOL=true" option when executing cmake
67
68# SET (VERBOSE_FIND true)
69
70# Performs the search and sets the variables
[1505]71FIND_PACKAGE(OGRE)
[1755]72FIND_PACKAGE(CEGUI)
[1505]73# FIND_PACKAGE(CEGUI_OGRE)
74FIND_PACKAGE(ENet)
[1535]75FIND_PACKAGE(Boost REQUIRED thread filesystem)
[1505]76FIND_PACKAGE(OpenAL)
77FIND_PACKAGE(ALUT)
78FIND_PACKAGE(OggVorbis)
79FIND_PACKAGE(ZLIB)
[1804]80#FIND_PACKAGE(Lua)
[1505]81FIND_PACKAGE(TCL)
82FIND_PACKAGE(DirectX)
83
[1776]84# Set the search paths for the linking
[1505]85LINK_DIRECTORIES(
86  ${OGRE_LIB_DIR}
[1776]87  ${CEGUI_LIB_DIR}
[1804]88#  ${CEGUI_SCRIPT_LIB_DIR}
[1776]89#  ${CEGUI_OGRE_LIB_DIR}
[1505]90  ${ENet_LIBRARY}
91  ${Boost_LIBRARY_DIRS}
92  ${Zlib_LIBRARY_DIR}
93  ${TCL_LIBRARY}
94)
95
[1776]96# Set the search paths for include files
[1505]97INCLUDE_DIRECTORIES(
98  ${OGRE_INCLUDE_DIR}
[1776]99  ${CEGUI_INCLUDE_DIR}
100#  ${CEGUI_OGRE_INCLUDE_DIR}
[1505]101  ${ENet_INCLUDE_DIR}
102  ${Boost_INCLUDE_DIRS}
103  ${OPENAL_INCLUDE_DIR}
104  ${ALUT_INCLUDE_DIR}
105  ${VORBIS_INCLUDE_DIR}
106  ${OGG_INCLUDE_DIR}
[1804]107#  ${Lua_INCLUDE_DIR}
[1505]108  ${TCL_INCLUDE_PATH}
109  ${DirectX_INCLUDE_DIR}
110  ${ZLIB_INCLUDE_DIR}
111)
112
[1776]113# Add main source dir
[1505]114ADD_SUBDIRECTORY(src)
115
Note: See TracBrowser for help on using the repository browser.