find_package(PkgConfig REQUIRED) now fails if pkg-config is not installed
Bug 12620

---
 Modules/FindPkgConfig.cmake |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index c47f583..ce58899 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -85,14 +85,12 @@
 
 ### Common stuff ####
 set(PKG_CONFIG_VERSION 1)
-set(PKG_CONFIG_FOUND   0)
 
 find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config 
executable")
 mark_as_advanced(PKG_CONFIG_EXECUTABLE)
 
-if(PKG_CONFIG_EXECUTABLE)
-  set(PKG_CONFIG_FOUND 1)
-endif(PKG_CONFIG_EXECUTABLE)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+find_package_handle_standard_args(PkgConfig DEFAULT_MSG PKG_CONFIG_EXECUTABLE)
 
 
 # Unsets the given variables
-- 
tg: (f2baff9..) t/pkg-config-required (depends on: master)
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to