forked from norlab-ulaval/norlab_dense_mapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (39 loc) · 1.85 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
cmake_minimum_required(VERSION 3.1)
project(norlab_dense_mapper)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(EXTERNAL_INCLUDE_DIRS "")
set(EXTERNAL_LIBS "")
find_package(libpointmatcher CONFIG)
set(EXTERNAL_INCLUDE_DIRS ${EXTERNAL_INCLUDE_DIRS} ${libpointmatcher_INCLUDE_DIRS})
set(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${libpointmatcher_LIBRARIES})
# norlab_dense_mapper target
include_directories(norlab_dense_mapper ${libpointmatcher_INCLUDE_DIRS})
add_library(norlab_dense_mapper norlab_dense_mapper/DenseMapper.cpp norlab_dense_mapper/DenseMap.cpp norlab_dense_mapper/RAMCellManager.cpp norlab_dense_mapper/HardDriveCellManager.cpp)
target_link_libraries(norlab_dense_mapper ${libpointmatcher_LIBRARIES})
# install target
set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
set(DEF_INSTALL_CMAKE_DIR lib/cmake/norlab_dense_mapper CACHE PATH "Installation directory for CMake files")
install(TARGETS norlab_dense_mapper DESTINATION ${INSTALL_LIB_DIR})
install(FILES norlab_dense_mapper/DenseMapper.h norlab_dense_mapper/DenseMap.h norlab_dense_mapper/CellManager.h
DESTINATION ${INSTALL_INCLUDE_DIR}/norlab_dense_mapper
)
configure_file(norlab_dense_mapperConfig.cmake.in
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/norlab_dense_mapperConfig.cmake" @ONLY
)
install(FILES
"${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/norlab_dense_mapperConfig.cmake"
DESTINATION ${DEF_INSTALL_CMAKE_DIR}
COMPONENT dev
)
# uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()