FindCDF.cmake
924 Bytes
# - Try to find the libcdf libraries
# Once done this will define
#
# libcdf_FOUND - flag that indicates libcdf is installed
# libcdf_INCLUDE_DIR - the libcdf include directory
# libcdf_LIBRARIES - the libcdf library directory
FIND_PATH(libcdf_INCLUDE_DIR cdf.h PATHS ${USERLOCAL_ROOT}/include)
FIND_LIBRARY(libcdf_LIBRARIES NAMES cdf PATHS ${USERLOCAL_ROOT}/lib NO_DEFAULT_PATH)
# set FOUND flag
IF(libcdf_INCLUDE_DIR AND libcdf_LIBRARIES)
SET(libcdf_FOUND 1)
if(NOT libcdf_FIND_QUIETLY)
message(STATUS "Found libcdf: ${libcdf_LIBRARIES}")
endif(NOT libcdf_FIND_QUIETLY)
ELSE(libcdf_INCLUDE_DIR AND libcdf_LIBRARIES)
SET(libcdf_FOUND 0 CACHE BOOL "Not found libcdf library")
message(STATUS "NOT Found libcdf, disabling it")
ENDIF(libcdf_INCLUDE_DIR AND libcdf_LIBRARIES)
get_filename_component(libcdf_LIBRARY_DIR ${libcdf_LIBRARIES} PATH)
MARK_AS_ADVANCED(libcdf_INCLUDE_DIR libcdf_LIBRARY_DIR libcdf_LIBRARIES)