From 3913e24ea3560b83c2def74d080e6910c10b6d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 22 May 2017 11:14:38 +0200 Subject: Do not call pkg_check_module if the MODULE_FOUND is already cached --- cmake/Modules/FindBOTAN.cmake | 6 ++++-- cmake/Modules/FindLIBIDN.cmake | 4 +++- cmake/Modules/FindLIBUUID.cmake | 4 +++- cmake/Modules/FindSYSTEMD.cmake | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'cmake') diff --git a/cmake/Modules/FindBOTAN.cmake b/cmake/Modules/FindBOTAN.cmake index 13d2de4..9eb76c4 100644 --- a/cmake/Modules/FindBOTAN.cmake +++ b/cmake/Modules/FindBOTAN.cmake @@ -17,8 +17,10 @@ include(FindPkgConfig) -pkg_check_modules(BOTAN botan-2) -pkg_check_modules(BOTAN botan-1.11) +if(NOT BOTAN_FOUND) + pkg_check_modules(BOTAN botan-2) + pkg_check_modules(BOTAN botan-1.11) +endif() if(NOT BOTAN_FOUND) find_path(BOTAN_INCLUDE_DIRS NAMES botan/botan.h diff --git a/cmake/Modules/FindLIBIDN.cmake b/cmake/Modules/FindLIBIDN.cmake index d42257f..c769d06 100644 --- a/cmake/Modules/FindLIBIDN.cmake +++ b/cmake/Modules/FindLIBIDN.cmake @@ -16,7 +16,9 @@ # This file is in the public domain include(FindPkgConfig) -pkg_check_modules(LIBIDN libidn) +if(NOT LIBIDN_FOUND) + pkg_check_modules(LIBIDN libidn) +endif() if(NOT LIBIDN_FOUND) find_path(LIBIDN_INCLUDE_DIRS NAMES stringprep.h diff --git a/cmake/Modules/FindLIBUUID.cmake b/cmake/Modules/FindLIBUUID.cmake index b4bf341..67352ab 100644 --- a/cmake/Modules/FindLIBUUID.cmake +++ b/cmake/Modules/FindLIBUUID.cmake @@ -16,7 +16,9 @@ # This file is in the public domain include(FindPkgConfig) -pkg_check_modules(LIBUUID uuid) +if(NOT LIBUUID_FOUND) + pkg_check_modules(LIBUUID uuid) +endif() if(NOT LIBUUID_FOUND) find_path(LIBUUID_INCLUDE_DIRS NAMES uuid/uuid.h diff --git a/cmake/Modules/FindSYSTEMD.cmake b/cmake/Modules/FindSYSTEMD.cmake index 899d07a..2d3f063 100644 --- a/cmake/Modules/FindSYSTEMD.cmake +++ b/cmake/Modules/FindSYSTEMD.cmake @@ -16,7 +16,9 @@ # This file is in the public domain include(FindPkgConfig) -pkg_check_modules(SYSTEMD libsystemd) +if(NOT SYSTEMD_FOUND) + pkg_check_modules(SYSTEMD libsystemd) +endif() if(NOT SYSTEMD_FOUND) find_path(SYSTEMD_INCLUDE_DIRS NAMES systemd/sd-daemon.h -- cgit v1.2.3