Blame view

cmake/modules/FindCRYPT.cmake 689 Bytes
4243d674   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
)