-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
79 lines (64 loc) · 2.27 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
68
69
70
71
72
73
74
75
76
77
#=========================================================================
#
# Copyright 2019 Kitware, Inc.
# Author: Matthieu Zins
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=========================================================================
cmake_minimum_required(VERSION 3.0)
project(CalibrationDepthPose)
option(BUILD_SYNTHETIC_DATA_GENERATOR "Build the synthetic data generator project" ON)
option(BUILD_EXAMPLES "Build the examples of calibration" ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)
find_package(Ceres REQUIRED)
add_definitions(${PCL_DEFINITIONS})
set(SOURCES_DIR CalibrationDepthPose)
# Headers
set(${PROJECT_NAME}_headers
${SOURCES_DIR}/calibCostFunctions.h
${SOURCES_DIR}/calibDepthPose.h
${SOURCES_DIR}/calibParameters.h
${SOURCES_DIR}/eigenUtils.h
${SOURCES_DIR}/matchingMatrix.h
${SOURCES_DIR}/matchingTools.h
${SOURCES_DIR}/pclUtils.h
${SOURCES_DIR}/threadPool.h
)
# Sources
set(${PROJECT_NAME}_sources
${SOURCES_DIR}/calibDepthPose.cxx
${SOURCES_DIR}/calibParameters.cxx
${SOURCES_DIR}/matchingMatrix.cxx
${SOURCES_DIR}/matchingTools.cxx
${SOURCES_DIR}/pclUtils.cxx
${SOURCES_DIR}/threadPool.cxx
)
add_library(${PROJECT_NAME} ${${PROJECT_NAME}_headers} ${${PROJECT_NAME}_sources})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
${PCL_INCLUDE_DIRS}
${CERES_INCLUDE_DIRS}
${SOURCES_DIR}/..
)
target_link_libraries(${PROJECT_NAME} PUBLIC
${CERES_LIBRARIES}
${PCL_LIBRARIES}
Eigen3::Eigen
)
if (BUILD_SYNTHETIC_DATA_GENERATOR)
add_subdirectory(syntheticDataGenerator)
endif (BUILD_SYNTHETIC_DATA_GENERATOR)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif (BUILD_EXAMPLES)