forked from mblum/libgp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·47 lines (34 loc) · 1.47 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
# Created by Manuel Blum on 2011-05-25.
# Copyright 2013 University of Freiburg.
# Modified by Einar J.M. Baumann (2017) <[email protected]>
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(libgp CXX C)
# if no option is given, standard is release
IF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Release)
ENDIF(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_CXX_FLAGS_RELEASE "-DCLSQUARE -Wall -O2 -fPIC")
set(CMAKE_CXX_FLAGS_DEBUG "-DCLSQUARE -Wall -g -fPIC")
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_MODULE_PATH})
IF (USE_LOCAL_EIGEN3)
message(STATUS "Using local Eigen3 in RpolyPlusPlus build.")
set(EIGEN3_INCLUDE_DIR "${EIGEN3_ROOT}")
message(STATUS "${EIGEN3_INCLUDE_DIR}")
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
ELSE()
FIND_PACKAGE(Eigen3 ${MIN_EIGEN_VERSION} REQUIRED)
IF (EIGEN3_FOUND)
MESSAGE(STATUS "Found Eigen version ${EIGEN3_VERSION}: ${EIGEN3_INCLUDE_DIR}")
ENDIF (EIGEN3_FOUND)
ENDIF(USE_LOCAL_EIGEN3)
# ----- Add include directories -----
INCLUDE_DIRECTORIES(SYSTEM ${EIGEN3_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
# ----- Add sources -----
INCLUDE("Sources.cmake")
# ----- Add library target -----
ADD_LIBRARY(gp ${LIBGP_SRC} ${LIBGP_INTERFACES})
# ----- Add install targets ----
set_target_properties(gp PROPERTIES PUBLIC_HEADER "${LIBGP_INTERFACES}")
install(TARGETS gp DESTINATION lib
PUBLIC_HEADER DESTINATION include/gp)