forked from alexlocher/hpmvs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (44 loc) · 1.34 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
cmake_minimum_required (VERSION 3.1 )
project (HPMVS)
ADD_DEFINITIONS(
-O3
)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#find_package(Loccom REQUIRED)
find_package(Eigen REQUIRED)
find_package(JPEG REQUIRED)
find_package(Gflags REQUIRED)
add_definitions(-DHPMVS_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE})
find_package(Glog REQUIRED)
ADD_SUBDIRECTORY(thirdLibs/nlopt-2.4.2)
ADD_SUBDIRECTORY(thirdLibs/stlplus3)
set(MY_SRC
src/hpmvs/NVMReader.cpp
src/hpmvs/doctree.cpp
src/hpmvs/CellProcessor.cpp
src/hpmvs/PatchOptimizer.cpp
src/hpmvs/Patch3d.cpp
src/hpmvs/Scene.cpp
src/hpmvs/Image.cpp
src/hpmvs/Camera.cpp
)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
include_directories(
"${PROJECT_SOURCE_DIR}/include"
${EIGEN_INCLUDE_DIR}
${JPEG_INCLUDE_DIR}
${GFLAGS_INCLUDE_DIRS}
${GLOG_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/thirdLibs/nlopt-2.4.2/api
${CMAKE_SOURCE_DIR}/thirdLibs/cimg
${CMAKE_SOURCE_DIR}/thirdLibs/
${CMAKE_SOURCE_DIR}/thirdLibs/stlplus3
)
add_executable (hpmvs src/main.cpp ${MY_SRC})
target_link_libraries(hpmvs ${JPEG_LIBRARIES} ${GFLAGS_LIBRARIES} ${GLOG_LIBRARIES} nlopt stlplus3)
set_property(TARGET hpmvs PROPERTY CXX_STANDARD 11)
install(TARGETS hpmvs RUNTIME DESTINATION bin)