summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.cmake
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-09-19 21:44:06 (GMT)
committerBrad King <brad.king@kitware.com>2016-09-20 12:24:28 (GMT)
commitd9cec8adca37965ee7c0742688b0f1de7edd9173 (patch)
tree6c820175ab2d241fa88d40583a0b48d5956c9fd8 /Modules/CPack.cmake
parent5c87b92b1b7888ee032e3c2a75f35f1f94f4dfa5 (diff)
downloadCMake-d9cec8adca37965ee7c0742688b0f1de7edd9173.zip
CMake-d9cec8adca37965ee7c0742688b0f1de7edd9173.tar.gz
CMake-d9cec8adca37965ee7c0742688b0f1de7edd9173.tar.bz2
CPack/RPM: Generate source rpm (SRPM) packages on demand
Closes: #15839
Diffstat (limited to 'Modules/CPack.cmake')
-rw-r--r--Modules/CPack.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 675b38b..169a634 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -502,6 +502,7 @@ if(NOT CPACK_SOURCE_GENERATOR)
if(CYGWIN)
option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON)
else()
+ option(CPACK_SOURCE_RPM "Enable to build RPM source packages" OFF)
option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON)
option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON)
option(CPACK_SOURCE_TXZ "Enable to build TXZ source packages" ON)
@@ -515,6 +516,7 @@ if(NOT CPACK_SOURCE_GENERATOR)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_7Z 7Z)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource)
+ cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_RPM RPM)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ)
cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TXZ TXZ)
@@ -544,6 +546,7 @@ mark_as_advanced(
CPACK_BINARY_ZIP
CPACK_SOURCE_7Z
CPACK_SOURCE_CYGWIN
+ CPACK_SOURCE_RPM
CPACK_SOURCE_TBZ2
CPACK_SOURCE_TGZ
CPACK_SOURCE_TXZ
@@ -651,6 +654,8 @@ set(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}")
set(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}")
set(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}")
+set(CPACK_RPM_PACKAGE_SOURCES "ON")
+
cpack_encode_variables()
configure_file("${cpack_source_input_file}"
"${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY)