diff options
author | Gautier Pelloux-Prayer <gautier+git@damsy.net> | 2016-11-24 10:14:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-28 21:18:07 (GMT) |
commit | cbccebbac970e37a772ee06ab766b6cbc085532f (patch) | |
tree | 473cf5c79b48caedbdaa5a5450f5e47000d90e8d /Modules/FindPkgConfig.cmake | |
parent | 8288d16126193e86bb6880a7d7b749649ad83e2c (diff) | |
download | CMake-cbccebbac970e37a772ee06ab766b6cbc085532f.zip CMake-cbccebbac970e37a772ee06ab766b6cbc085532f.tar.gz CMake-cbccebbac970e37a772ee06ab766b6cbc085532f.tar.bz2 |
FindPkgConfig: Fix missing error text when library version is specified
Calls like `pkg_check_modules(somelibrary>=3.22)` that specify a version
requirement should still display an informative error when the package
is not found. Fix our logic accordingly.
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r-- | Modules/FindPkgConfig.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 3f75b19..8b7131b 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -381,8 +381,9 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma if (_pkg_check_modules_pkg_op) list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}") else() - list(APPEND _pkg_check_modules_exist_query --exists --print-errors --short-errors) + list(APPEND _pkg_check_modules_exist_query --exists) endif() + list(APPEND _pkg_check_modules_exist_query --print-errors --short-errors) _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION) _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX) |