-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
62 lines (51 loc) · 1.92 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
cmake_minimum_required(VERSION 2.8.11)
project(3d_reconstruction)
if (POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_PREFIX_PATH $ENV{HOME}/Qt/5.7/clang_64/lib/cmake/)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
#find_package(Eigen3 REQUIRED)
find_package(FreeImage REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5OpenGL REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Ceres REQUIRED)
find_package(Boost COMPONENTS program_options filesystem system thread chrono regex REQUIRED)
find_package(OpenMP)
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
find_package(Glew REQUIRED)
find_package(Threads REQUIRED)
find_package(JPEG REQUIRED)
qt5_add_resources(QT_RESOURCES res/resources.qrc)
include_directories(
${Qt5Core_INCLUDE_DIRS}
${Qt5OpenGL_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${FREEIMAGE_INCLUDE_DIRS}
${CERES_INCLUDES}
${Boost_INCLUDE_DIR}
${GLUT_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${JPEG_INCLUDE_DIR}
)
IF (OPENMP_FOUND)
ADD_DEFINITIONS("-DOPENMP_FOUND")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
ENDIF (OPENMP_FOUND)
add_subdirectory(3rdparty/sqlite)
add_subdirectory(3rdparty/sift_gpu)
add_subdirectory(3rdparty/pmvs)
add_subdirectory(3rdparty/poisson_triangulation)
add_subdirectory(src)
add_executable(3d_reconstruction ${QT_RESOURCES})
target_link_libraries(3d_reconstruction
3d_reconstruction_src
pthread dl sqlite sift_gpu pmvs_lib cmvs_lib tinycthread image_lib graclus_lib nlopt numeric_lib
${OpenCV_LIBRARIES} ${CERES_LIBRARIES} ${Boost_LIBRARIES} ${FREEIMAGE_LIBRARIES} ${GLEW_LIBRARIES}
${GLUT_LIBRARY} ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${JPEG_LIBRARIES})
qt5_use_modules(3d_reconstruction Core OpenGL)