FindCDF.cmake
1021 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 /include /usr/include /usr/local/include /usr/local/cdf/include ${USERLOCAL_ROOT}/include)
FIND_LIBRARY(libcdf_LIBRARIES NAMES cdf PATHS /lib /usr/lib /usr/local/lib /usr/local/cdf/lib ${USERLOCAL_ROOT}/lib )
# 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)