-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
65 lines (53 loc) · 993 Bytes
/
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
cmake_minimum_required(VERSION 3.5)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(undistortX)
find_package(Ceres REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Eigen3 REQUIRED NO_MODULE)
set(SOURCES
sources/geometry.h
sources/types.h
sources/undistortion.h
sources/undistortion.cpp
)
set(PROJECT_SOURCES
sources/main.cpp
)
set(TEST_SOURCES
tests/test.cpp
)
add_executable(
${PROJECT_NAME}
${SOURCES}
${PROJECT_SOURCES}
)
target_link_libraries(
${PROJECT_NAME}
Ceres::ceres
Eigen3::Eigen
${OpenCV_LIBS}
)
target_include_directories(
${PROJECT_NAME}
PRIVATE
sources
${OpenCV_INCLUDE_DIRS}
)
add_executable(
${PROJECT_NAME}_TEST
${SOURCES}
${TEST_SOURCES}
)
target_link_libraries(
${PROJECT_NAME}_TEST
Ceres::ceres
Eigen3::Eigen
${OpenCV_LIBS}
)
target_include_directories(
${PROJECT_NAME}_TEST
PRIVATE
sources
${OpenCV_INCLUDE_DIRS}
)