forked from autowarefoundation/autoware_ai_perception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (54 loc) · 1.54 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
cmake_minimum_required(VERSION 2.8.3)
project(pcl_omp_registration)
find_package(catkin REQUIRED COMPONENTS)
find_package(PCL REQUIRED)
catkin_package(
INCLUDE_DIRS include
LIBRARIES pcl_omp_registration
)
find_package(Eigen3 QUIET)
if(NOT EIGEN3_FOUND)
# Fallback to cmake_modules
find_package(cmake_modules REQUIRED)
find_package(Eigen REQUIRED)
set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES}) # Not strictly necessary as Eigen is head only
# Possibly map additional variables to the EIGEN3_ prefix.
else()
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()
if(PCL_VERSION VERSION_LESS "1.7.2")
message("pcl_omp requires PCL 1.7.2 or higher versions")
else()
set(srcs src/ndt.cpp)
set(incs
include/pcl_omp_registration/ndt.h
include/pcl_omp_registration/registration.h
)
set(impl_incs
include/pcl_omp_registration/impl/ndt.hpp
include/pcl_omp_registration/impl/registration.hpp
)
include_directories(
include
${PCL_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
add_library(pcl_omp_registration
${srcs}
${incs}
${impl_incs}
)
target_link_libraries(pcl_omp_registration
${PCL_LIBRARIES}
${EIGEN3_LIBRARIES}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(TARGETS pcl_omp_registration
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
endif()