# - Try to find the libnetcdf libraries # Once done this will define # # libnetcdf_FOUND - flag that indicates libnetcdf is installed # libnetcdf_INCLUDE_DIR - the libnetcdf include directory # libnetcdf_LIBRARIES - the libnetcdf library directory FIND_PATH(libnetcdf_INCLUDE_DIR netcdf.h PATHS ${USERLOCAL_ROOT}/include NO_DEFAULT_PATH) FIND_LIBRARY(libnetcdf_LIBRARIES NAMES netcdf PATHS ${USERLOCAL_ROOT}/lib NO_DEFAULT_PATH) # set FOUND flag IF(libnetcdf_INCLUDE_DIR AND libnetcdf_LIBRARIES) SET(libnetcdf_FOUND 1) if(NOT libnetcdf_FIND_QUIETLY) message(STATUS "Found libnetcdf: ${libnetcdf_LIBRARIES}") endif(NOT libnetcdf_FIND_QUIETLY) ELSE(libnetcdf_INCLUDE_DIR AND libnetcdf_LIBRARIES) SET(libnetcdf_FOUND 0 CACHE BOOL "Not found libnetcdf library") message(STATUS "NOT Found libnetcdf, disabling it") ENDIF(libnetcdf_INCLUDE_DIR AND libnetcdf_LIBRARIES) MARK_AS_ADVANCED(libnetcdf_INCLUDE_DIR libnetcdf_LIBRARIES)