/
CMakeLists.txt
65 lines (47 loc) · 1.59 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
cmake_minimum_required (VERSION 2.6)
project (RGBD2SCHEMATIC)
include_directories(include)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
# Octomap
find_package(OCTOMAP)
if (OCTOMAP_FOUND)
include_directories(${OCTOMAP_INCLUDE_DIRS})
link_directories(${OCTOMAP_LIBRARY_DIRS})
link_libraries(${OCTOMAP_LIBRARIES})
else()
message("Octomap not found. Disabling octomap2schematic build.")
endif (OCTOMAP_FOUND)
# PCL
find_package(PCL COMPONENTS common io filters)
if (PCL_FOUND)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
else()
message("PCL not found. Disabling pcd2schematic build.")
endif (PCL_FOUND)
##############################################
# create rgbd2schematic common library
add_library(rgbd2schematic
src/converter.cpp
src/writer.cpp)
target_link_libraries(rgbd2schematic z)
##############################################
# create octomap2schematic executable
if (OCTOMAP_FOUND)
add_executable(octomap2schematic
src/octomap_converter.cpp
src/octomap2schematic.cpp)
target_link_libraries(octomap2schematic rgbd2schematic)
target_link_libraries(octomap2schematic ${OCTOMAP_LIBRARIES})
endif (OCTOMAP_FOUND)
##############################################
# create pcd2schematic executable
if (PCL_FOUND)
add_executable(pcd2schematic
src/pcd_converter.cpp
src/pcd2schematic.cpp)
target_link_libraries(pcd2schematic rgbd2schematic)
target_link_libraries(rgbd2schematic ${PCL_LIBRARIES})
endif (PCL_FOUND)