-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (36 loc) · 1.3 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 2.8)
project(face_recon_2019)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS} -O3")
add_definitions(-DPROJECT_DIR="${PROJECT_SOURCE_DIR}")
include_directories(include)
include_directories(thirdparty/Sophus)
# Eigen
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
# Ceres Solver
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
# OpenCV
find_package(OpenCV 3 QUIET COMPONENTS core features2d)
if (OpenCV_FOUND)
message(STATUS "Found OpenCV 3 headers in: ${OpenCV_INCLUDE_DIRS}")
else()
message(STATUS "Didn't find OpenCV 3, looking for 2")
# HINTS needed for macos homebrew (install with `brew install opencv@2`)
find_package( OpenCV 2 REQUIRED COMPONENTS core features2d
HINTS /usr/local/opt/opencv@2 )
message(STATUS "Found OpenCV 2 headers in: ${OpenCV_INCLUDE_DIRS}")
endif()
# Nabo
find_package(nabo)
# Boost
find_package(Boost 1.40 COMPONENTS program_options REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
set(SOURCES
src/main.cc
src/facemodel.cpp
src/rgbdscan.cpp
src/facesolver.cpp)
add_executable(${PROJECT_NAME} ${SOURCES})
target_link_libraries(${PROJECT_NAME} OpenMeshCore ${OpenCV_LIBS} nabo ceres ${Boost_LIBRARIES})