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

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

sync with github

File size: 1.0 KB
Line 
1# Locate libpwquality
2#   https://github.com/libpwquality/libpwquality
3#
4# This module defines
5#  LibPWQuality_FOUND
6#  LibPWQuality_LIBRARIES, where to find the library
7#  LibPWQuality_INCLUDE_DIRS, where to find pwquality.h
8#
9include(FindPkgConfig)
10include(FindPackageHandleStandardArgs)
11
12pkg_search_module(pc_pwquality QUIET pwquality)
13
14find_path(LibPWQuality_INCLUDE_DIR
15    NAMES pwquality.h
16    PATHS ${pc_pwquality_INCLUDE_DIRS}
17)
18find_library(LibPWQuality_LIBRARY
19    NAMES pwquality
20    PATHS ${pc_pwquality_LIBRARY_DIRS}
21)
22if(pc_pwquality_FOUND)
23    set(LibPWQuality_LIBRARIES ${LibPWQuality_LIBRARY})
24    set(LibPWQuality_INCLUDE_DIRS ${LibPWQuality_INCLUDE_DIR} ${pc_pwquality_INCLUDE_DIRS})
25endif()
26
27find_package_handle_standard_args(LibPWQuality DEFAULT_MSG
28    LibPWQuality_INCLUDE_DIRS
29    LibPWQuality_LIBRARIES
30)
31mark_as_advanced(LibPWQuality_INCLUDE_DIRS LibPWQuality_LIBRARIES)
32
33set_package_properties(
34    LibPWQuality PROPERTIES
35    DESCRIPTION "Password quality checking library"
36    URL "https://github.com/libpwquality/libpwquality"
37)
Note: See TracBrowser for help on using the repository browser.