-
Notifications
You must be signed in to change notification settings - Fork 7
/
CMakeLists.txt
56 lines (34 loc) · 1.43 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
###########################################################
# Top level CMakeLists.txt file for the MOOS Project
###########################################################
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
set(PROJECTNAME GUIMOOS)
project(${PROJECTNAME})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMakeScripts_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH ${CMakeScripts_MODULE_DIR})
# Turn on all compiler warnings
include(EnableAllWarnings)
# Bring in helper functions for dealing with CACHE INTERNAL variables
include(CacheInternalHelpers)
# We want to create dynamic libraries
set(BUILD_SHARED_LIBS true)
# Enable Doxygen build with 'make doxygen'
option(ENABLE_DOXYGEN "Enable a 'make doc' target for Doxygen documentation")
if (ENABLE_DOXYGEN)
include(UseDoxygen)
endif()
########### SETTING UP PREPROCESSOR ################
include(PlatformDefines)
#####################################################
# Toby Schneider's request for fPIC on amd64
IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
ENDIF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
add_subdirectory(Tools)