source: calamares/trunk/fuentes/CMakeModules/FindCrypt.cmake @ 7538

Last change on this file since 7538 was 7538, checked in by kbut, 17 months ago

sync with github

File size: 928 bytes
Line 
1# - Find libcrypt
2# Find the libcrypt includes and the libcrypt libraries
3# This module defines
4# LIBCRYPT_INCLUDE_DIR, root crypt include dir. Include crypt with crypt.h
5# LIBCRYPT_LIBRARY, the path to libcrypt
6# LIBCRYPT_FOUND, whether libcrypt was found
7
8if( CMAKE_SYSTEM MATCHES "FreeBSD" )
9    # FreeBSD has crypt(3) declared in unistd.h, which lives in
10    # libc; the libcrypt found here is not used.
11    find_path( CRYPT_INCLUDE_DIR NAMES unistd.h )
12    add_definitions( -DNO_CRYPT_H )
13else()
14    find_path( CRYPT_INCLUDE_DIR
15        NAMES crypt.h
16        HINTS
17            ${CMAKE_INSTALL_INCLUDEDIR}
18        NO_CACHE
19    )
20endif()
21
22find_library( CRYPT_LIBRARIES
23    NAMES crypt
24    HINTS
25        ${CMAKE_INSTALL_LIBDIR}
26)
27
28include( FindPackageHandleStandardArgs )
29find_package_handle_standard_args(
30    Crypt
31    REQUIRED_VARS CRYPT_LIBRARIES CRYPT_INCLUDE_DIR
32)
33
34mark_as_advanced( CRYPT_INCLUDE_DIR CRYPT_LIBRARIES )
Note: See TracBrowser for help on using the repository browser.