-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
104 lines (77 loc) · 2.78 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# This is the CMake script for compiling a GTVimageVect project.
project( GTVimageVect )
cmake_minimum_required (VERSION 3.1)
cmake_policy(SET CMP0057 NEW) # the new interpretation of IN_LIST is by default not set (at least until 3.21.1) else findiing boost dependancie fails.
include_directories ("${PROJECT_SOURCE_DIR}/src")
macro(use_cxx11)
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fext-numeric-literals")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
endmacro(use_cxx11)
use_cxx11()
# CLI11
include_directories( "${PROJECT_SOURCE_DIR}/ext/" )
# -----------------------------------------------------------------------------
# Define variables and cmake parameters, and display some information
# -----------------------------------------------------------------------------
# DGtal
FIND_PACKAGE(DGtal REQUIRED)
INCLUDE_DIRECTORIES(${DGTAL_INCLUDE_DIRS})
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# Cairo
FIND_PATH(CAIRO_INCLUDE_DIRS cairo.h
$ENV{CAIRODIR}/include
$ENV{CAIRODIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/usr/include/cairo # MT
/usr/local/include/cairo #brew, manual
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/local/include/cairo # DarwinPorts # MT
/opt/csw/include # Blastwave
/opt/include/cairo
/usr/X11R6/include/cairo
)
find_library(CAIRO_LIBRAIRIES
NAMES cairo
PATHS /usr/lib
/usr/local/lib
ENV CAIRO_ROOT
ENV LD_LIBRARY_PATH
ENV LIBRARY_PATH
PATH_SUFFIXES cairo
)
SET(CAIRO_FOUND 0)
IF(CAIRO_LIBRAIRIES AND CAIRO_INCLUDE_DIRS)
SET(CAIRO_FOUND 1)
ENDIF(CAIRO_LIBRAIRIES AND CAIRO_INCLUDE_DIRS)
IF(CAIRO_FOUND)
INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIRS})
message(STATUS "Cairo found in INCLUDE=" ${CAIRO_INCLUDE_DIRS})
message(STATUS "Cairo found in LIBRARY=" ${CAIRO_LIBRAIRIES})
ELSE(CAIRO_FOUND)
message(FATAL_ERROR "cairo not found. Check the cmake variables associated to this package or disable it." )
ENDIF(CAIRO_FOUND)
SET(SRC_COMP
${PROJECT_SOURCE_DIR}/src/BasicVectoImageExporter.cpp
)
SET(SOURCE_HEADER_FILES
${PROJECT_SOURCE_DIR}/src/BezierCurve.h
${PROJECT_SOURCE_DIR}/src/BasicVectoImageExporter.h
${PROJECT_SOURCE_DIR}/src/BezierTriangle2.h
${PROJECT_SOURCE_DIR}/src/BreadthFirstVisitorWithParent.h
${PROJECT_SOURCE_DIR}/src/BreadthFirstVisitorWithParent.ih
${PROJECT_SOURCE_DIR}/src/CairoViewer.h
${PROJECT_SOURCE_DIR}/src/ImageConnecter.h
${PROJECT_SOURCE_DIR}/src/ImageTVRegularization.h
${PROJECT_SOURCE_DIR}/src/ImageTriangulation.h
)
add_subdirectory(bin)
add_subdirectory(tests)