forked from stulp/dmpbbo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt~
74 lines (60 loc) · 2.96 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
###############################################################################
# General settings
# Some settings related to building/installing libraries and header files
# Set this to STATIC if you want to build static libraries instead.
set(SHARED_OR_STATIC "SHARED")
set(LIB_INSTALL_DIR /usr/local/lib)
set(INCLUDE_INSTALL_DIR /usr/local/include)
# Never build inside the source tree
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
# Project name is not mandatory, but you should use it
project(OO_DMP_BBO)
# States that CMake required version must be greater than 2.6
cmake_minimum_required(VERSION 2.6)
# Some flags for CXX
set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
# Appends the cmake/modules path inside the MAKE_MODULE_PATH variable which stores the
# directories of additional CMake modules (ie. MacroOutOfSourceBuild.cmake):
set(CMAKE_MODULE_PATH ${oo_dmp_bbo_SOURCE_DIR}/cmake/modules "${CMAKE_SOURCE_DIR}/src/functionapproximators/" ${CMAKE_MODULE_PATH})
include_directories(${CMAKE_SOURCE_DIR}/src)
link_directories(${CMAKE_SOURCE_DIR}/lib)
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR} CACHE PATH "Comment" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
###############################################################################
# See if LWPR is installed.
find_package(LWPR)
if(LWPR_FOUND)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_LWPR")
endif()
###############################################################################
# Find boost packages
find_package( Boost 1.34 COMPONENTS filesystem system serialization REQUIRED)
link_directories ( ${Boost_LIBRARY_DIRS} )
include_directories ( ${Boost_INCLUDE_DIRS} )
###############################################################################
# Things to compile are in the src/ directory
add_subdirectory(src)
###############################################################################
# Generate doxygen documentation from CMake
# http://www.bluequartz.net/projects/EIM_Segmentation/SoftwareDocumentation/html/usewithcmakeproject.html
option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" ON)
if(BUILD_DOCUMENTATION)
FIND_PACKAGE(Doxygen)
if (NOT DOXYGEN_FOUND)
message(FATAL_ERROR
"Doxygen is needed to build the documentation. Please install it correctly")
endif()
#-- Configure the Template Doxyfile for our specific project
configure_file(${CMAKE_SOURCE_DIR}/docs/Doxyfile.in
${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
#-- Add a custom target to run Doxygen when ever the project is built
add_custom_target (Docs
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
# IF you do NOT want the documentation to be generated EVERY time you build the project
# then leave out the 'ALL' keyword from the above command.
endif()