-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathCMakeLists.txt
83 lines (53 loc) · 1.99 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
# Created by the script cgal_create_cmake_script_with_options
# This is the CMake script for compiling a set of CGAL applications.
project(MA)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
set(CMAKE_CXX_STANDARD 14)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "RELWITHDEBINFO")
ENDIF()
ADD_DEFINITIONS(-std=c++11 -g)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(Eigen3 REQUIRED)
include_directories(${EIGEN3_INCLUDE_DIR})
find_package(CImg REQUIRED)
include_directories(${CIMG_INCLUDE_DIRS})
link_libraries(${CIMG_PROCESS_LIBS})
find_package(SuiteSparse)
include_directories(${SUITESPARSE_INCLUDE_DIRS})
link_libraries(${SUITESPARSE_LIBRARIES})
if(SUITESPARSEQR_FOUND)
add_definitions(-DMA_USE_SUITESPARSE_QR)
endif()
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost COMPONENTS timer chrono REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
link_libraries(${Boost_LIBRARIES})
# CGAL and its components
find_package( CGAL REQUIRED)
# The next line fixes an issue with Anaconda interfering with X11
# on Mac OS X. It causes the system to check the usual install path first.
# Otherwise, it tries to use the X11 in Anaconda which is not suitable.
set(CMAKE_INCLUDE_PATH "/opt/X11/include;${CMAKE_INCLUDE_PATH}")
find_package(X11 REQUIRED)
include_directories(${X11_INCLUDE_DIR})
link_libraries(${X11_LIB})
include_directories(${MA_SOURCE_DIR}/include)
subdirs(tests)
if ( NOT CGAL_FOUND )
message(STATUS "This project requires the CGAL library, and will not be compiled.")
return()
endif()
# include helper file
include( ${CGAL_USE_FILE} )
# Boost and its components
find_package( Boost REQUIRED )
if ( NOT Boost_FOUND )
message(STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
# include for local package
# Creating entries for all .cpp/.C files with "main" routine
# ##########################################################
include( CGAL_CreateSingleSourceCGALProgram )