-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
28 lines (23 loc) · 1.12 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
# Do NOT edit this file unless you really know what you are doing
set(CMAKE_COLOR_MAKEFILE ON)
cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0076 NEW)
if(TARGET geophysics-netcdf)
return()
endif()
# Set project name
project(geophysics-netcdf VERSION 1.0 DESCRIPTION "C++ interface for handling GA's Geophysical NetCDF data format" LANGUAGES CXX)
message(STATUS "Configuring geophysics-netcdf")
include(cmake/Message-Functions.cmake)
if(PROJECT_IS_TOP_LEVEL)
message(FATAL_ERROR "geophysics-netcdf cannot be a TOP LEVEL project")
endif()
# Add the header-only library
set(target geophysics-netcdf)
add_library(${target} INTERFACE)
set_target_properties(${target} PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(${target} PROPERTIES PUBLIC_HEADER include/geophysics_netcdf.hpp)
target_include_directories(${target} INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/submodules/marray/include/andres>")
target_include_directories(${target} INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>")
target_link_libraries(${target} INTERFACE NETCDF::CXX)
target_link_libraries(${target} INTERFACE cpp-utils)