summaryrefslogtreecommitdiffstats
path: root/Modules/CPackRPM.cmake
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2018-03-15 20:29:31 (GMT)
committerCraig Scott <craig.scott@crascit.com>2018-03-16 21:25:48 (GMT)
commit73f9b2974c80394564e6af5b808133cba48ccf34 (patch)
tree028d9c31191b9666baaf1e47a1f45f042cf8cb9f /Modules/CPackRPM.cmake
parentfd28c382b44ee355099750419ecd46e0aa175de0 (diff)
downloadCMake-73f9b2974c80394564e6af5b808133cba48ccf34.zip
CMake-73f9b2974c80394564e6af5b808133cba48ccf34.tar.gz
CMake-73f9b2974c80394564e6af5b808133cba48ccf34.tar.bz2
project: Add HOMEPAGE_URL named parameter
This sets variables like PROJECT_HOMEPAGE_URL, which can be used as default values for various things (packaging modules, doxygen defaults, etc.). Some packaging modules have been updated to do this as part of this commit. Co-Author: Craig Scott <craig.scott@crascit.com>
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r--Modules/CPackRPM.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index 258922c..87385de 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -191,7 +191,7 @@
# The projects URL.
#
# * Mandatory : NO
-# * Default : -
+# * Default : :variable:`CMAKE_PROJECT_HOMEPAGE_URL`
#
# .. variable:: CPACK_RPM_PACKAGE_DESCRIPTION
# CPACK_RPM_<component>_PACKAGE_DESCRIPTION
@@ -1787,6 +1787,10 @@ function(cpack_rpm_generate_package)
endif()
endif()
+ if(NOT CPACK_RPM_PACKAGE_URL AND CMAKE_PROJECT_HOMEPAGE_URL)
+ set(CPACK_RPM_PACKAGE_URL "${CMAKE_PROJECT_HOMEPAGE_URL}")
+ endif()
+
# CPACK_RPM_PACKAGE_NAME (mandatory)
if(NOT CPACK_RPM_PACKAGE_NAME)
string(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME)