Merge topic 'cpack-rpm-pre-semicolon'

3cdf23985f CPackRPM: avoid a spurious `;` in the `%pre` and other sections with scripts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !6415
This commit is contained in:
Brad King
2021-08-03 15:00:27 +00:00
committed by Kitware Robot

View File

@@ -11,9 +11,7 @@ function(set_spec_script_if_enabled TYPE PACKAGE_NAME VAR)
if(PACKAGE_NAME)
set(PACKAGE_NAME " -n ${PACKAGE_NAME}")
endif()
set(${TYPE}_
"%${TYPE}${PACKAGE_NAME}\n"
"${VAR}\n" PARENT_SCOPE)
set(${TYPE}_ "%${TYPE}${PACKAGE_NAME}\n${VAR}\n" PARENT_SCOPE)
else()
set(${TYPE} "" PARENT_SCOPE)
endif()