FindCSPICE.cmake
943 Bytes
# - Try to find the cspice libraries
# Once done this will define
#
# libcspice_FOUND - flag that indicates cspice lib is installed
# libcspice_INCLUDE_DIR - the cspice lib include directory
# libcspice_LIBRARIES - the cspice lib library directory
FIND_PATH(libcspice_INCLUDE_DIR SpiceSPK.h PATHS ${USERLOCAL_ROOT}/include/cspice/ NO_DEFAULT_PATH)
FIND_LIBRARY(libcspice_LIBRARIES NAMES cspice PATHS ${USERLOCAL_ROOT}/lib NO_DEFAULT_PATH)
# set FOUND flag
IF(libcspice_INCLUDE_DIR AND libcspice_LIBRARIES)
SET(libcspice_FOUND 1)
if(NOT libcspice_FIND_QUIETLY)
message(STATUS "Found libcspice: ${libcspice_LIBRARIES}")
endif(NOT libcspice_FIND_QUIETLY)
ELSE(libcspice_INCLUDE_DIR AND libcspice_LIBRARIES)
SET(libcspice_FOUND 0 CACHE BOOL "Not found libcspice library")
message(STATUS "NOT Found libcspice, disabling it")
ENDIF(libcspice_INCLUDE_DIR AND libcspice_LIBRARIES)
MARK_AS_ADVANCED(libcspice_INCLUDE_DIR libcspice_LIBRARIES)