FindCRYPT.cmake
689 Bytes
FIND_PATH(CRYPT_INCLUDE_DIR crypt.h
/usr/local/include/crypt
/usr/local/include
/usr/include/crypt
/usr/include
)
SET(CRYPT_NAMES crypt)
FIND_LIBRARY(CRYPT_LIBRARY
NAMES ${CRYPT_NAMES}
PATHS /usr/lib /usr/local/lib
)
IF(CRYPT_INCLUDE_DIR AND CRYPT_LIBRARY)
SET(CRYPT_FOUND TRUE)
SET(CRYPT_LIBRARIES ${CRYPT_LIBRARY} )
ELSE(CRYPT_INCLUDE_DIR AND CRYPT_LIBRARY)
SET(CRYPT_FOUND FALSE)
SET(CRYPT_LIBRARIES)
ENDIF(CRYPT_INCLUDE_DIR AND CRYPT_LIBRARY)
IF(NOT CRYPT_FOUND)
IF(CRYPT_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "crypt library and headers required.")
ENDIF(CRYPT_FIND_REQUIRED)
ENDIF(NOT CRYPT_FOUND)
MARK_AS_ADVANCED(
CRYPT_LIBRARY
CRYPT_INCLUDE_DIR
)