From 39fc3ed7e0db554818f41c3623bd858e0399dbb0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 3 Jun 2015 09:23:02 -0400 Subject: CPackDeb: Check dpkg-shlibdeps --ignore-missing-info flag Check for this flag explicitly in the --help output before using it. It turns out there are some versions of the tool that support --version but not --ignore-missing-info. --- Modules/CPackDeb.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index 48f6dd1..09cddcd 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -399,9 +399,12 @@ function(cpack_deb_prepare_package_vars) file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian) file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "") - # only set ignore-missing-info flag for dpkg-shlibdeps that have --version option - # (those are newer and also have --ignore-missing-info flag) - if(SHLIBDEPS_EXECUTABLE_VERSION) + # Add --ignore-missing-info if the tool supports it + execute_process(COMMAND env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --help + OUTPUT_VARIABLE _TMP_HELP + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if(_TMP_HELP MATCHES "--ignore-missing-info") set(IGNORE_MISSING_INFO_FLAG "--ignore-missing-info") endif() -- cgit v0.12