-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
29 lines (20 loc) · 1007 Bytes
/
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
cmake_minimum_required (VERSION 3.9)
project(dephier)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
find_package(GDAL)
add_subdirectory(submodules/richdem EXCLUDE_FROM_ALL)
include_directories(submodules)
add_library(dephier INTERFACE)
target_include_directories(dephier INTERFACE include/)
target_compile_features(dephier INTERFACE cxx_auto_type cxx_std_17)
if(USE_GDAL AND GDAL_FOUND)
add_executable(dephier.exe src/main.cpp)
target_link_libraries(dephier.exe PRIVATE dephier richdem)
add_executable(dephier_paper_tests.exe src/dephier_paper_tests.cpp)
target_link_libraries(dephier_paper_tests.exe PRIVATE dephier richdem)
target_compile_features(dephier_paper_tests.exe PUBLIC cxx_auto_type cxx_std_17)
install(TARGETS dephier.exe DESTINATION bin)
install(TARGETS dephier_paper_tests.exe DESTINATION bin)
else()
message(WARNING "GDAL is required to build the DepHier example programs; it is not needed to use the DepHier library in another project.")
endif()