-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (39 loc) · 1.22 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
cmake_minimum_required(VERSION 3.10)
project(TEAR)
#compile
#set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_BUILD_TYPE Release)
set (CMAKE_CXX_STANDARD 14)
if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
endif()
# find libraries
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED)
find_package(PCL REQUIRED) #note
find_package(OpenMP REQUIRED)
include_directories(
include
${PCL_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/pmc-src
)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
# build a lib for the project
FILE(GLOB_RECURSE IncFiles "include/*")
set(SOURCES
src/registration.cpp
src/simu_process.cpp
)
add_library(${PROJECT_NAME}_lib SHARED ${IncFiles} ${SOURCES})
target_link_libraries(${PROJECT_NAME}_lib ${PCL_LIBRARIES} Eigen3::Eigen)
# openmp
if (OPENMP_FOUND)
message("OPENMP FOUND")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif ()
# Change this line to include your own executable file
add_executable(TEAR demo.cpp)
target_link_libraries(TEAR ${PROJECT_NAME}_lib)