Blame view

cmake/modules/FindNetCDF.cmake 545 Bytes
4243d674   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FIND_PATH(NETCDFINCLUDE_DIR netcdf.h
  HINTS
    $ENV{NETCDF_ROOT}/include
    ${NETCDF_ROOT}/include
)
mark_as_advanced(NETCDFINCLUDE_DIR)

find_library(NETCDFLIBRARY 
    NAMES netcdf
    HINTS
        $ENV{NETCDF_ROOT}
        ${NETCDF_ROOT}
    PATH_SUFFIXES lib
)
mark_as_advanced(NETCDFLIBRARY)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NetCdf DEFAULT_MSG NETCDFLIBRARY NETCDFINCLUDE_DIR)

if(NETCDF_FOUND)
    set(NETCDFINCLUDE_DIRS ${NETCDFINCLUDE_DIR})
    set(NETCDFLIBRARIES ${NETCDFLIBRARY})
endif()