File: FindNetCDF.cmake

package info (click to toggle)
xdmf 3.0%2Bgit20190531-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,756 kB
  • sloc: cpp: 67,089; ansic: 5,172; python: 4,566; f90: 1,247; java: 187; fortran: 173; makefile: 83; sh: 28
file content (29 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (9)
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
#
# Find NetCDF include directories and libraries
#
# NetCDF_FOUND - System has NetCDF
# NetCDF_INCLUDE_DIR - The NetCDF include directory
# NetCDF_LIBRARIES - The libraries needed to use NetCDF

FIND_PATH(NetCDF_INCLUDE_DIR netcdf.h)

FIND_LIBRARY(NetCDF_LIBRARIES
  NAMES netcdf
  ${NetCDF_PREFIX}
  ${NetCDF_PREFIX}/lib64
  ${NetCDF_PREFIX}/lib
  /usr/local/lib64
  /usr/lib64
  /usr/lib64/netcdf-3
  /usr/local/lib
  /usr/lib
  /usr/lib/netcdf-3
)

INCLUDE(FindPackageHandleStandardArgs)

# handle the QUIETLY and REQUIRED arguments and set EXODUS_FOUND to TRUE if 
# all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NetCDF DEFAULT_MSG NetCDF_INCLUDE_DIR NetCDF_LIBRARIES)

MARK_AS_ADVANCED(NetCDF_INCLUDE_DIR NetCDF_LIBRARIES)