forked from igclib/igclib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
39 lines (28 loc) · 1.22 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
cmake_minimum_required(VERSION 3.7) # support apt compatibility
enable_testing()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# why does cmake strips runtime paths ?
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wunused -Wextra -g -DDLIB_USE_CUDA=0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wunused -Wextra -g -pedantic")
message("-- CMAKE_CXX_FLAGS_DEBUG : ${CMAKE_CXX_FLAGS_DEBUG}")
message("-- CMAKE_CXX_FLAGS_RELEASE : ${CMAKE_CXX_FLAGS_RELEASE}")
project(igclib VERSION 0.1.1)
configure_file("${PROJECT_SOURCE_DIR}/include/igclib/config.hpp.in" "${PROJECT_SOURCE_DIR}/include/igclib/config.hpp")
# find boost libraries
find_package(Boost COMPONENTS system filesystem REQUIRED)
find_package(Threads REQUIRED)
find_package(Eigen3 REQUIRED)
# disable third-party tests
set(JSON_BuildTests OFF CACHE INTERNAL "")
set(BUILD_CPR_TESTS OFF CACHE INTERNAL "")
set(USE_SYSTEM_CURL ON)
# add third-party libraries
add_subdirectory(third-party/json)
add_subdirectory(third-party/cpr)
add_subdirectory(third-party/geographiclib)
# add source and tests
add_subdirectory(src)
add_subdirectory(tests)