-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
42 lines (30 loc) · 1.24 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
cmake_minimum_required(VERSION 2.8)
project(kabamaru)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# compile with C++11 support
add_definitions("-std=c++11")
find_package(CUDA)
find_package(SIFTGPU REQUIRED)
find_package(OpenCV 3 REQUIRED)
find_package(PCL 1.8 REQUIRED)
find_package(namaris REQUIRED)
include_directories(${CUDA_INCLUDE_DIRS})
include_directories(${SIFTGPU_INCLUDE_DIRS})
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${PCL_INCLUDE_DIRS})
include_directories(${namaris_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
include_directories(include)
file(GLOB src_files src/*.cpp)
set(LIB_NAME "kabamaru")
add_library(${LIB_NAME} SHARED ${src_files})
target_link_libraries(${LIB_NAME} ${SIFTGPU_LIBRARIES} ${OpenCV_LIBRARIES} ${PCL_LIBRARIES} ${namaris_LIBRARIES} ${CUDA_LIBRARIES})
install(TARGETS ${LIB_NAME} LIBRARY DESTINATION lib)
install(DIRECTORY include/ DESTINATION include)
# uninstall target
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)