diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-19 19:30:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-01-20 13:33:51 (GMT) |
commit | 55c3435d88618d7ed935736604e7ab989cef4b28 (patch) | |
tree | 8ecf212d07d33c1f5e44226fb56f69516eecebb9 /Modules/FindPkgConfig.cmake | |
parent | a6518c30e0ae0de17cd89dd52158501fc92d4455 (diff) | |
download | CMake-55c3435d88618d7ed935736604e7ab989cef4b28.zip CMake-55c3435d88618d7ed935736604e7ab989cef4b28.tar.gz CMake-55c3435d88618d7ed935736604e7ab989cef4b28.tar.bz2 |
FindPkgConfig: respect REQUIRED (#12620)
find_package(PkgConfig REQUIRED) now fails if pkg-config is not found.
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r-- | 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 |