-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (36 loc) · 1.27 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
cmake_minimum_required(VERSION 2.8.9)
#set the project name
project (curve)
#Set the compiler
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE Release)
set( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set( LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#Set ccache (for speeding up)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
set (CMAKE_CXX_FLAGS "-DPCL_ONLY_CORE_POINT_TYPES=ON -DNO_EXPLICIT_INSTANTIATIONS")
############### Dependencies #######################
#Add opencv cmake .config path
#set (OpenCV_DIR opt/opencv/release)
#Find opencv libs
find_package(OpenCV REQUIRED)
#SET(Boost_USE_STATIC_LIBS ON)
SET(Boost_USE_SHARED_LIBS ON)
set(CMAKE_USE_PTHREADS_INIT true)
set(CMAKE_USE_PTHREADS_INIT ON)
find_package(Threads REQUIRED )
find_package(Boost COMPONENTS program_options REQUIRED)
find_package(Threads)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
endif()
############### My Files #########################
#Bring the headers
include_directories(${PROJECT_SOURCE_DIR}/include)
#Bring the source files
add_subdirectory(${PROJECT_SOURCE_DIR}/src/ceres)
add_subdirectory(${PROJECT_SOURCE_DIR}/src/g2o)