-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·94 lines (79 loc) · 2.76 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(DynAlp)
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
"${DynAlp_SOURCE_DIR}/cmake"
"${DynAlp_SOURCE_DIR}/cmake/Utils"
"${DynAlp_SOURCE_DIR}/cmake/Packages"
)
FIND_PATH(DYNAMINDDEV DynaMindDevCmake.txt
PATHS $ENV{DYNAMIND_DIR}/include
PATH_SUFFIXES dynamindcore/CMake)
IF(DYNAMIND_INCLUDE_DIR)
MESSAGE(STATUS "Compiled from toolbox")
MESSAGE(STATUS "DYNAMIND_INCLUDE_DIR ${DYNAMIND_INCLUDE_DIR}")
SET (DYNAMIND_CORE_LIBRARY dynamindcore)
SET (DYNAMIND_TOOLBOX_LIBRARY dynamindtoolbox)
SET (DYNAMIND_EXTENSIONS_LIBRARY dynamind-extensions)
MESSAGE(STATUS "${DYNAMIND_CORE_LIBRARY}")
ELSE()
MESSAGE(STATUS "Compiled from stand alone")
FIND_PATH(DYNAMINDDEV DynaMindDevCmake.txt
PATHS $ENV{DYNAMIND_DIR}/include
PATH_SUFFIXES dynamindcore/CMake)
IF(DYNAMINDDEV)
INCLUDE(${DYNAMINDDEV}/DynaMindDevCmake.txt)
ELSE()
MESSAGE(FATAL_ERROR "Could not find dynamind. Maybe not installed ?")
ENDIF()
ENDIF()
IF(USEQT5)
FIND_PACKAGE(Qt5Core)
FIND_PACKAGE(Qt5Gui)
INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS})
ELSE()
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtSql REQUIRED)
SET(QT_USE_QTSQL 1)
ENDIF()
FIND_PACKAGE(GDAL)
INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR})
SET(CGAL_DONT_OVERRIDE_CMAKE_FLAGS "ON" CACHE BOOL "")
find_package(CGAL QUIET COMPONENTS Core REQUIRED)
include(${CGAL_USE_FILE})
IF(NOT USEQT5)
INCLUDE(${QT_USE_FILE})
ENDIF()
INCLUDE_DIRECTORIES( ${DYNAMIND_INCLUDE_DIR})
INCLUDE_DIRECTORIES( ${DYNAMIND_EXTENSIONS_INCLUDE_DIR})
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
message(STATUS "OpenMP is enabled")
else()
add_definitions(-DOPENMP_DISABLED)
message(STATUS "OpenMP is disabled. Consider using a compiler that supports OpenMP")
endif()
if (CMAKE_BUILD_TYPE STREQUAL Debug)
message(STATUS Debug)
add_definitions(-DDEBUG)
else ()
message(STATUS Release)
endif()
IF(CMAKE_BUILD_TYPE STREQUAL Debug)
MESSAGE(STATUS "Build Type = Debug")
ADD_DEFINITIONS(-DDEBUG)
ELSE()
MESSAGE(STATUS "Build Type = Release")
ENDIF()
IF(DYNAMIND_TOOLBOX_BUILD_DIR)
SET(LIBRARY_OUTPUT_PATH ${DYNAMIND_TOOLBOX_BUILD_DIR}/Modules)
SET(EXECUTABLE_OUTPUT_PATH ${DYNAMIND_TOOLBOX_BUILD_DIR}/Modules)
SET(SCRIPT_PATH ${DYNAMIND_TOOLBOX_BUILD_DIR}/PythonModules )
ELSE()
SET(LIBRARY_OUTPUT_PATH ${DynAlp_BINARY_DIR})
SET(EXECUTABLE_OUTPUT_PATH ${DynAlp_BINARY_DIR})
SET(SCRIPT_PATH ${DynAlp_BINARY_DIR}/PythonModules )
ENDIF()
# ADD_SUBDIRECTORY(scripts)
ADD_SUBDIRECTORY(src)