CMake: fix up warnings from the LibPWQuality module

- don't include other find modules
- pkgconfig isn't totally necessary, it might work without
This commit is contained in:
Adriaan de Groot 2020-08-04 23:09:51 +02:00
parent 3f1b31e352
commit a8c4f5b758

View File

@ -6,10 +6,16 @@
# LibPWQuality_LIBRARIES, where to find the library
# LibPWQuality_INCLUDE_DIRS, where to find pwquality.h
#
include(FindPkgConfig)
find_package(PkgConfig)
include(FindPackageHandleStandardArgs)
pkg_search_module(pc_pwquality QUIET pwquality)
if(PkgConfig_FOUND)
pkg_search_module(pc_pwquality QUIET pwquality)
else()
# It's just possible that the find_path and find_library will
# find it **anyway**, so let's pretend it was there.
set(pc_pwquality_FOUND ON)
endif()
find_path(LibPWQuality_INCLUDE_DIR
NAMES pwquality.h