summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAnthony Baker <snoopcode@gmx.de>2023-10-03 14:10:36 (GMT)
committerBrad King <brad.king@kitware.com>2023-10-03 15:59:12 (GMT)
commit4c96b31e4bd8f37658291a1cda2996df101f6aa9 (patch)
tree5cb9ecf4e7e1db85f8cffe93fd271e4d5f806274 /Modules
parentcbc0fd68a5dc50302294179dae0bb37ee9b66ccc (diff)
downloadCMake-4c96b31e4bd8f37658291a1cda2996df101f6aa9.zip
CMake-4c96b31e4bd8f37658291a1cda2996df101f6aa9.tar.gz
CMake-4c96b31e4bd8f37658291a1cda2996df101f6aa9.tar.bz2
FindPkgConfig: Report not-found package names in fatal error message
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPkgConfig.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 5466e79..27d25fb 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -555,7 +555,7 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
endif()
set(_pkg_check_modules_packages)
- set(_pkg_check_modules_failed)
+ set(_pkg_check_modules_failed "")
_pkg_set_path_internal()
@@ -609,14 +609,14 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
message(STATUS " ${_pkgconfig_error}")
endif()
- set(_pkg_check_modules_failed 1)
+ string(APPEND _pkg_check_modules_failed " - ${_pkg_check_modules_pkg}\n")
endif()
endforeach()
if(_pkg_check_modules_failed)
# fail when requested
if (${_is_required})
- message(FATAL_ERROR "A required package was not found")
+ message(FATAL_ERROR "The following required packages were not found:\n${_pkg_check_modules_failed}")
endif ()
else()
# when we are here, we checked whether requested modules