diff options
author | Lisa Welsch <lisa.welsch@etm.at> | 2021-07-08 13:12:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-09 12:06:00 (GMT) |
commit | bb5fc38209df343490be31dd34a65816b0799b59 (patch) | |
tree | ef635948035801236f988d92c2a84b937d259da3 | |
parent | a42b753c419136e3593042c62129bcaa36b50146 (diff) | |
download | CMake-bb5fc38209df343490be31dd34a65816b0799b59.zip CMake-bb5fc38209df343490be31dd34a65816b0799b59.tar.gz CMake-bb5fc38209df343490be31dd34a65816b0799b59.tar.bz2 |
CPack/RPM: Add option to set %global __requires_exclude_from
-rw-r--r-- | Help/cpack_gen/rpm.rst | 11 | ||||
-rw-r--r-- | Help/release/dev/cpack-rpm-requires-exclude-from.rst | 6 | ||||
-rw-r--r-- | Modules/Internal/CPack/CPackRPM.cmake | 12 |
3 files changed, 29 insertions, 0 deletions
diff --git a/Help/cpack_gen/rpm.rst b/Help/cpack_gen/rpm.rst index 322ab68..f6274f9 100644 --- a/Help/cpack_gen/rpm.rst +++ b/Help/cpack_gen/rpm.rst @@ -1035,3 +1035,14 @@ Source RPM packaging has its own set of variables: example:: set(CPACK_RPM_BUILDREQUIRES "python >= 2.5.0, cmake >= 2.8") + +.. VARIABLE:: CPACK_RPM_REQUIRES_EXCLUDE_FROM + + * Mandatory : NO + * Default : - + + May be used to keep the dependency generator from scanning specific files + or directories for dependencies. Note that you can use a regular + expression that matches all of the directories or files, for example:: + + set(CPACK_RPM_REQUIRES_EXCLUDE_FROM "bin/libqsqloci.*\\.so.*") diff --git a/Help/release/dev/cpack-rpm-requires-exclude-from.rst b/Help/release/dev/cpack-rpm-requires-exclude-from.rst new file mode 100644 index 0000000..7125901 --- /dev/null +++ b/Help/release/dev/cpack-rpm-requires-exclude-from.rst @@ -0,0 +1,6 @@ +cpack-rpm-requires-exclude-from +------------------------------- + +* The :cpack_gen:`CPack RPM Generator` gained the + :variable:`CPACK_RPM_REQUIRES_EXCLUDE_FROM` option avoid scanning + specific paths for dependencies. diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 47d2a5c..bfb42f3 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1162,6 +1162,16 @@ function(cpack_rpm_generate_package) set(TMP_RPM_SPEC_INSTALL_POST "%define __spec_install_post ${CPACK_RPM_SPEC_INSTALL_POST}") endif() + # CPACK_RPM_REQUIRES_EXCLUDE_FROM + # May be defined to keep the dependency generator from + # scanning specific files or directories for deps. + if(CPACK_RPM_REQUIRES_EXCLUDE_FROM) + if(CPACK_RPM_PACKAGE_DEBUG) + message("CPackRPM:Debug: User defined CPACK_RPM_REQUIRES_EXCLUDE_FROM = ${CPACK_RPM_REQUIRES_EXCLUDE_FROM}") + endif() + set(TMP_RPM_REQUIRES_EXCLUDE_FROM "%global __requires_exclude_from ${CPACK_RPM_REQUIRES_EXCLUDE_FROM}") + endif() + # CPACK_RPM_POST_INSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_INSTALL_SCRIPT_FILE) # CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_UNINSTALL_SCRIPT_FILE) # CPACK_RPM_POST_TRANS_SCRIPT_FILE (or CPACK_RPM_<COMPONENT>_POST_TRANS_SCRIPT_FILE) @@ -1650,6 +1660,7 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ \@FILE_NAME_DEFINE\@ %define _unpackaged_files_terminate_build 0 \@TMP_RPM_SPEC_INSTALL_POST\@ +\@TMP_RPM_REQUIRES_EXCLUDE_FROM\@ \@CPACK_RPM_SPEC_MORE_DEFINE\@ \@CPACK_RPM_COMPRESSION_TYPE_TMP\@ @@ -1784,6 +1795,7 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ \@FILE_NAME_DEFINE\@ %define _unpackaged_files_terminate_build 0 \@TMP_RPM_SPEC_INSTALL_POST\@ +\@TMP_RPM_REQUIRES_EXCLUDE_FROM\@ \@CPACK_RPM_SPEC_MORE_DEFINE\@ \@CPACK_RPM_COMPRESSION_TYPE_TMP\@ |