-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
34 lines (24 loc) · 1.06 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
cmake_minimum_required(VERSION 3.0)
project(MapEvaluationTools)
set(CMAKE_CXX_STANDARD 14)
add_subdirectory(pybind11)
find_package(PCL REQUIRED)
find_package(Eigen3 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
add_executable (test src/test.cpp src/map_evaluation.hpp)
target_link_libraries (test ${PCL_LIBRARIES})
#add_executable (orth_map_metrics src/orth_map_metrics.cpp)
#target_link_libraries (orth_map_metrics ${PCL_LIBRARIES})
# pybind11
pybind11_add_module(map_evaluation src/map_evaluation.hpp src/map_evaluation.cpp)
set_target_properties(map_evaluation PROPERTIES PREFIX "")
set_target_properties(map_evaluation PROPERTIES SUFFIX ".so")
target_link_libraries(map_evaluation PRIVATE ${PYTHON_LIBARIES} ${PCL_LIBRARIES})