-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
executable file
·62 lines (51 loc) · 2.23 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
#=============================================================================#
#============================== Project ======================================#
#=============================================================================#
cmake_minimum_required(VERSION 3.0)
Project(MTF_OSM)
# To force c++11
if (${CMAKE_VERSION} VERSION_LESS 3.1)
add_compile_options(-std=c++11)
elseif (${CMAKE_VERSION} VERSION_LESS 3.6.3 AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
add_compile_options(-std=c++11)
else()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif ()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE Release)
endif()
# Files to do find_package for some module
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
# Options
option(BEMTOOL_WITH_EXAMPLES "Build bemtool examples ?" ON)
option(BEMTOOL_WITH_TESTS "Build bemtool tests ?" ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#=============================================================================#
#========================== External Libraries ===============================#
#=============================================================================#
#Bemtool
find_package(BemTool REQUIRED)
# Boost package - special functions
find_package(Boost REQUIRED)
# # EIGEN3
# find_package(Eigen)
# message("-- Eigen include files found in " "${Eigen_INCLUDE_DIRS}")
#=============================================================================#
#=========================== Libraries =======================================#
#=============================================================================#
add_library(bemtool INTERFACE)
target_include_directories(bemtool INTERFACE
${BEMTOOL_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS})
# For headers to show in IDE
if (NOT "${CMAKE_VERSION}" VERSION_LESS 3.1)
target_sources(bemtool INTERFACE
${BEMTOOL_INCLUDE_DIR}
)
endif()
#=============================================================================#
#========================== Repertories ======================================#
#=============================================================================#
add_subdirectory(src)