forked from NOAA-EMC/AQM-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
43 lines (34 loc) · 965 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# check environment
cmake_minimum_required(VERSION 3.15)
# set compiler
if (NOT DEFINED ENV{CMAKE_Fortran_COMPILER})
message(FATAL_ERROR "CMAKE_Fortran_COMPILER is not defined")
endif()
set(CMAKE_Fortran_COMPILER $ENV{CMAKE_Fortran_COMPILER})
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
set(CMAKE_INSTALL_BINDIR exec)
endif()
if(NOT DEFINED BUILD_POST_STAT)
set(BUILD_POST_STAT on)
endif()
# set the project name and version
project(
AQM-utils
VERSION 1.0.0
LANGUAGES Fortran)
# include local macros
list (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# find external libraries
find_package(NetCDF REQUIRED COMPONENTS Fortran)
find_package(g2 REQUIRED)
find_package(w3emc REQUIRED)
find_package(w3nco REQUIRED)
find_package(bacio REQUIRED)
if(BUILD_POST_STAT)
find_package(PNG REQUIRED)
find_package(ZLIB REQUIRED)
find_package(bufr REQUIRED)
find_package(Jasper REQUIRED)
endif()
# add project's subdirectories
add_subdirectory(sorc)