-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
97 lines (82 loc) · 2.59 KB
/
CMakeLists.txt
File metadata and controls
97 lines (82 loc) · 2.59 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
project(FSLAM CXX)
cmake_minimum_required(VERSION 2.8)
# Add path for custom modules
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
)
set(PACKAGE_VERSION "0.1")
set(PACKAGE_NAME "FastSLAM")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "yeonjin.lee@nasa.gov")
# Local Custom Options
option(FSLAM_BUILD_TOOLS
"Build the FastSLAM test tools." ON)
option(BUILD_SHARED_LIBS
"Produce shared libraries." TRUE)
option(ENABLE_RPATHS
"Use RPaths in executables to find shared libraries." TRUE)
option(ENABLE_PROFILING
"Link against the google perftools." FALSE)
option(ENABLE_TCMALLOC
"Link against the google perftools's tcmalloc." FALSE)
if (ENABLE_RPATHS)
set(CMAKE_SKIP_RPATH FALSE CACHE BOOL "")
set(CMAKE_SKIP_BUILD_RPATH FALSE CACHE BOOL "")
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE CACHE BOOL "")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "")
if(APPLE)
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib)
endif(APPLE)
mark_as_advanced(
CMAKE_SKIP_RPATH
CMAKE_SKIP_BUILD_RPATH
CMAKE_BUILD_WITH_INSTALL_RPATH
CMAKE_INSTALL_RPATH
CMAKE_INSTALL_RPATH_USE_LINK_PATH
)
endif(ENABLE_RPATHS)
# Find Dependencies
include(AddFSLAM)
find_package(Eigen3 REQUIRED)
find_package(GooglePerfTools)
find_package(OpenCL REQUIRED)
#Find Boost
#FIND_PACKAGE(Boost)
#IF (Boost_FOUND)
# INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
# ADD_DEFINITIONS( "-DHAS_BOOST" )
#ENDIF()
find_package(Boost 1.44.0)
# uncomment the following line to let the env variable BOOST_DIR set the Boost_DIR path
# set(Boost_DIR $ENV{BOOST_ROOT})
# just print out the variables to see their values
message("Boost_DIR : " ${Boost_DIR})
message("BOOST_ROOT: " $ENV{BOOST_ROOT})
# now see if boost was actually found
if (Boost_FOUND)
message("Boost WAS found!")
endif (Boost_FOUND)
# Finish up local custom options based on what was found above
fslam_enable_testing()
if (ENABLE_PROFILING AND GOOGLE_PERFTOOLS_FOUND)
set(FSLAM_ENABLE_PROFILING ON )
else()
set(FSLAM_ENABLE_PROFILING OFF )
endif()
if (ENABLE_TCMALLOC AND GOOGLE_PERFTOOLS_FOUND)
set(FSLAM_ENABLE_TCMALLOC ON)
else()
set(FSLAM_ENABLE_TCMALLOC OFF)
endif()
# Add common search locations
include_directories(${FSLAM_SOURCE_DIR}/cpp)
include_directories(${FSLAM_BINARY_DIR}/cpp)
# Adding build directories
add_subdirectory(cpp/core)
add_subdirectory(cpp/fastslam1)
add_subdirectory(cpp/fastslam2)
add_subdirectory(cpp/gtest)
# Adding test directories
add_subdirectory(testcode)