diff options
author | Brad King <brad.king@kitware.com> | 2021-07-12 12:41:56 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-07-12 12:42:03 (GMT) |
commit | 2d830247bae808cc68f26288ff72768b21d0c102 (patch) | |
tree | 4035d921a143b08e25301c7c1fa8fcb3d569eb23 | |
parent | ca696c73e1d1444b3e3a2d66905880e1ce25000f (diff) | |
parent | bb5fc38209df343490be31dd34a65816b0799b59 (diff) | |
download | CMake-2d830247bae808cc68f26288ff72768b21d0c102.zip CMake-2d830247bae808cc68f26288ff72768b21d0c102.tar.gz CMake-2d830247bae808cc68f26288ff72768b21d0c102.tar.bz2 |
Merge topic 'cpack-rpm-requires-exclude-from'
bb5fc38209 CPack/RPM: Add option to set %global __requires_exclude_from
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6324
-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\@ |