-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathCMakeLists.txt
47 lines (39 loc) · 1.11 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
cmake_minimum_required(VERSION 3.10)
set(PACKAGE_NAME fisheye-calib-adapter)
project(${PACKAGE_NAME})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Eigen3 3.3 REQUIRED)
find_package(GTest REQUIRED)
find_package(absl CONFIG REQUIRED)
find_package(Ceres REQUIRED)
find_package(OpenCV REQUIRED)
find_package(yaml-cpp REQUIRED)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${EIGEN3_INCLUDE_DIR} ${OpenCV_INCLUDE_DIRS})
set(SOURCE_FILES
src/adapter.cpp
src/utils.cpp
src/model/double_sphere.cpp
src/model/EUCM.cpp
src/model/RadTan.cpp
src/model/KB.cpp
src/model/OcamCalib.cpp
src/model/UCM.cpp
)
add_library(${PACKAGE_NAME}
${SOURCE_FILES}
)
add_definitions(-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
add_executable(main example/main.cpp)
target_link_libraries(main
${PACKAGE_NAME}
Eigen3::Eigen
${CERES_LIBRARIES}
${OpenCV_LIBS}
${YAML_CPP_LIBRARIES}
)
target_include_directories(main PRIVATE
${CERES_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${YAML_CPP_INCLUDE_DIR}
)