-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
46 lines (37 loc) · 1.25 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
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE TYPE INTERNAL FORCE)
project(voxel_project)
# Options
set(LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Libs CACHE PATH "Path to lib folder")
set(Eigen3_DIR ${LIBRARY_DIR}/Eigen/share/eigen3/cmake CACHE PATH "Path to installed Eigen")
set(OpenCV_DIR ${LIBRARY_DIR}/install/opencv CACHE PATH "Path to installed OpenCV")
# Set C++ flags
set(CMAKE_CXX_STANDARD 17)
find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)
# Define header and source files
set(HEADERS
src/Calibration.h
src/Model.h
src/PoseEstimation.h
src/Segmentation.h
src/MarchingCubes.h
src/VoxelCarving.h
src/ColorReconstruction.h
src/Postprocessing3d.h
src/Benchmark.h
src/Utils.h
)
set(SOURCES
src/main.cpp
src/Model.cpp
src/MarchingCubes.cpp
src/VoxelCarving.cpp
src/ColorReconstruction.cpp
src/Postprocessing3d.cpp
)
add_executable(voxel_project ${HEADERS} ${SOURCES})
target_link_libraries(voxel_project Eigen3::Eigen ${OpenCV_LIBS})
# Visual Studio properties
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT voxel_project)
set_property(TARGET voxel_project PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/)