summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-09-25 15:44:46 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-09-25 15:49:18 +0200
commit3201dd521e1b816dca9caba8792b5a5890546d1c (patch)
tree5881ce7edd4b25b0ec4eb64abb6271a92e16fbcf
parent0cd1ef0932dfb4c0c2c7d0eaa5d91a8593b3a3d7 (diff)
downloadcmake-3201dd521e1b816dca9caba8792b5a5890546d1c.tar.gz
FindPkgConfig: Show more info when pkg-config --version fails
Fixes: #21239
-rw-r--r--Modules/FindPkgConfig.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index 93827d8bec..6294a4cc43 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -47,7 +47,9 @@ if (PKG_CONFIG_EXECUTABLE)
string(APPEND _PKG_CONFIG_FAILURE_MESSAGE
"The command\n"
" \"${PKG_CONFIG_EXECUTABLE}\" --version\n"
- " failed with output\n${_PKG_CONFIG_VERSION_ERROR}"
+ " failed with output:\n${PKG_CONFIG_VERSION_STRING}\n"
+ " stderr: \n${_PKG_CONFIG_VERSION_ERROR}\n"
+ " result: \n${_PKG_CONFIG_VERSION_RESULT}"
)
set(PKG_CONFIG_EXECUTABLE "")
unset(PKG_CONFIG_VERSION_STRING)