diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2019-06-14 06:33:27 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2019-06-19 05:14:25 (GMT) |
commit | e33f4cb0cb18a03aa12b308ba654ec5f305365f8 (patch) | |
tree | 3acc9a000e3af60256899231a0bb20559fcf4763 /Modules/BundleUtilities.cmake | |
parent | 6695383dd5a7855321dc011158e30ec24a7cf902 (diff) | |
download | CMake-e33f4cb0cb18a03aa12b308ba654ec5f305365f8.zip CMake-e33f4cb0cb18a03aa12b308ba654ec5f305365f8.tar.gz CMake-e33f4cb0cb18a03aa12b308ba654ec5f305365f8.tar.bz2 |
BundleUtilities: use if(... IN_LIST ...)
Diffstat (limited to 'Modules/BundleUtilities.cmake')
-rw-r--r-- | Modules/BundleUtilities.cmake | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 182720b..2f3b9e1 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -243,6 +243,9 @@ if(DEFINED CMAKE_GENERATOR) endif() endif() +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST + # The functions defined in this file depend on the get_prerequisites function # (and possibly others) found in: # @@ -599,17 +602,9 @@ function(get_bundle_keys app libs dirs keys_var) set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${exepath}" "${dirs}" 0 "${main_rpaths}") set(prereqs "") - set(ignoreFile FALSE) get_filename_component(prereq_filename ${lib} NAME) - if(NOT CFG_IGNORE_ITEM STREQUAL "") - foreach(item ${CFG_IGNORE_ITEM}) - if(item STREQUAL prereq_filename) - set(ignoreFile TRUE) - endif() - endforeach() - endif() - if(NOT ignoreFile) + if(NOT prereq_filename IN_LIST CFG_IGNORE_ITEM) get_prerequisites("${lib}" prereqs 1 1 "${exepath}" "${dirs}" "${main_rpaths}") foreach(pr ${prereqs}) set_bundle_key_values(${keys_var} "${lib}" "${pr}" "${exepath}" "${dirs}" 1 "${main_rpaths}") @@ -642,17 +637,9 @@ function(get_bundle_keys app libs dirs keys_var) # Add each prerequisite to the keys: # set(prereqs "") - set(ignoreFile FALSE) get_filename_component(prereq_filename ${exe} NAME) - if(NOT CFG_IGNORE_ITEM STREQUAL "" ) - foreach(item ${CFG_IGNORE_ITEM}) - if(item STREQUAL prereq_filename) - set(ignoreFile TRUE) - endif() - endforeach() - endif() - if(NOT ignoreFile) + if(NOT prereq_filename IN_LIST CFG_IGNORE_ITEM) get_prerequisites("${exe}" prereqs 1 1 "${exepath}" "${dirs}" "${exe_rpaths}") foreach(pr ${prereqs}) set_bundle_key_values(${keys_var} "${exe}" "${pr}" "${exepath}" "${dirs}" 1 "${exe_rpaths}") @@ -1031,18 +1018,9 @@ function(verify_bundle_prerequisites bundle result_var info_var) message(STATUS "executable file ${count}: ${f}") set(prereqs "") - set(ignoreFile FALSE) get_filename_component(prereq_filename ${f} NAME) - if(NOT CFG_IGNORE_ITEM STREQUAL "" ) - foreach(item ${CFG_IGNORE_ITEM}) - if(item STREQUAL prereq_filename) - set(ignoreFile TRUE) - endif() - endforeach() - endif() - - if(NOT ignoreFile) + if(NOT prereq_filename IN_LIST CFG_IGNORE_ITEM) get_item_rpaths(${f} _main_exe_rpaths) get_prerequisites("${f}" prereqs 1 1 "${exepath}" "${_main_exe_rpaths}") @@ -1141,3 +1119,5 @@ function(verify_app app) message(FATAL_ERROR "error: verify_app failed") endif() endfunction() + +cmake_policy(POP) |