-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
44 lines (31 loc) · 1.03 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
cmake_minimum_required(VERSION 2.8.3)
project(sparse_reconstruction)
set(VISUALIZATION ON)
add_library( sparse_reconstruction SHARED
maxflow/maxflow
maxflow/block.h
maxflow/graph.h
maxflow/instances.inc
maxflow/graph.cpp
maxflow/maxflow.cpp
src/SparseReconstruction.cpp
include/SparseReconstruction.h
)
include_directories(
include
maxflow
)
set(GCC_CGAL_COMPILE_FLAGS "-frounding-math")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_CGAL_COMPILE_FLAGS} -Wno-write-strings -o3" )
set(SPARSE_RECONSTRUCTION_LIBRARIES gmp CGAL CGAL_Core)
if(VISUALIZATION)
add_definitions(-DGL_VISUALIZATION)
set(GL_LIBS GL glut)
endif()
set_target_properties(sparse_reconstruction
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib"
)
target_link_libraries(sparse_reconstruction ${SPARSE_RECONSTRUCTION_LIBRARIES} ${GL_LIBS})