diff options
author | Ben Boeckel <mathstuf@gmail.com> | 2015-09-18 01:08:05 (GMT) |
---|---|---|
committer | Ben Boeckel <mathstuf@gmail.com> | 2015-09-18 01:08:19 (GMT) |
commit | 7f7f1eecfd6834b8a499f0fde49469a10a1b2905 (patch) | |
tree | d7eed5982ff324bdd12a9d45d8218b6a7c17b39e /Modules/FindPkgConfig.cmake | |
parent | eb154697c054c43f59dd61bf3edeaf34bf76ad21 (diff) | |
download | CMake-7f7f1eecfd6834b8a499f0fde49469a10a1b2905.zip CMake-7f7f1eecfd6834b8a499f0fde49469a10a1b2905.tar.gz CMake-7f7f1eecfd6834b8a499f0fde49469a10a1b2905.tar.bz2 |
FindPkgConfig: use execute_process to strip trailing whitespace
Diffstat (limited to 'Modules/FindPkgConfig.cmake')
-rw-r--r-- | Modules/FindPkgConfig.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index ae6903e..0f2e22d 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -70,14 +70,14 @@ macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) execute_process( COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist} OUTPUT_VARIABLE _pkgconfig_invoke_result - RESULT_VARIABLE _pkgconfig_failed) + RESULT_VARIABLE _pkgconfig_failed + OUTPUT_STRIP_TRAILING_WHITESPACE) if (_pkgconfig_failed) set(_pkgconfig_${_varname} "") _pkgconfig_unset(${_prefix}_${_varname}) else() string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - string(REGEX REPLACE " +$" "" _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") if (NOT ${_regexp} STREQUAL "") string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") |