diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CPack/DEB/Helpers.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index 45c85c3..a204a3c 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -26,3 +26,13 @@ function(verifyDebControl FILE PREFIX VERIFY_FILES) endif() endforeach() endfunction() + +function(getPackageInfo FILE RESULT_VAR) + execute_process(COMMAND ${DPKG_EXECUTABLE} -I ${FILE} + WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}" + OUTPUT_VARIABLE package_info_ + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + + set(${RESULT_VAR} "${package_info_}" PARENT_SCOPE) +endfunction() |