summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2012-06-05 08:20:43 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2012-06-05 08:20:43 (GMT)
commit7321c94e593ff50714d20d99b7042e9f96ee057e (patch)
treed60b2cc7d92117fbfe27f300e4842bd4e4ee75ae /Modules/CPackRPM.cmake
parent55cadb68066dfd4dc0c053ff25560adfce9b6d56 (diff)
downloadCMake-7321c94e593ff50714d20d99b7042e9f96ee057e.zip
CMake-7321c94e593ff50714d20d99b7042e9f96ee057e.tar.gz
CMake-7321c94e593ff50714d20d99b7042e9f96ee057e.tar.bz2
CPackRPM: avoid leakage of RPM directive from one component to another.
Fixes #0013248 Inspired-By: Sergei Golubchik
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index cba746f..ae93512 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -488,7 +488,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
-ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ ELSE(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ # Do not forget to unset previously set header (from previous component)
+ UNSET(TMP_RPM_${_RPM_SPEC_HEADER})
+ ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ENDFOREACH(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST