From a8c4f5b758ac17960a5b79d1653c0649a23627c8 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 4 Aug 2020 23:09:51 +0200 Subject: [PATCH] CMake: fix up warnings from the LibPWQuality module - don't include other find modules - pkgconfig isn't totally necessary, it might work without --- CMakeModules/FindLibPWQuality.cmake | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeModules/FindLibPWQuality.cmake b/CMakeModules/FindLibPWQuality.cmake index 84136f5ad..2728afb1e 100644 --- a/CMakeModules/FindLibPWQuality.cmake +++ b/CMakeModules/FindLibPWQuality.cmake @@ -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