[cmake-developers] [PATCH 4/6] Process executables first when scanning bundle
Adam Strzelecki
ono at java.pl
Fri Sep 5 07:50:42 EDT 2014
This makes rpaths populated (if any), so libraries containing @rpath will be
resolved properly.
---
Modules/BundleUtilities.cmake | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index 9733bc9..e99da9b 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -527,21 +527,6 @@ function(get_bundle_keys app libs dirs keys_var)
#
get_bundle_all_executables("${bundle}" file_list)
- # For each extra lib, accumulate a key as well and then also accumulate
- # any of its prerequisites. (Extra libs are typically dynamically loaded
- # plugins: libraries that are prerequisites for full runtime functionality
- # but that do not show up in otool -L output...)
- #
- foreach(lib ${libs})
- set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${executable}" "${dirs}" 0)
-
- set(prereqs "")
- get_prerequisites("${lib}" prereqs 1 1 "${executable}" "${dirs}")
- foreach(pr ${prereqs})
- set_bundle_key_values(${keys_var} "${lib}" "${pr}" "${executable}" "${dirs}" 1)
- endforeach()
- endforeach()
-
# For each executable found in the bundle, accumulate keys as we go.
# The list of keys should be complete when all prerequisites of all
# binaries in the bundle have been analyzed.
@@ -560,6 +545,21 @@ function(get_bundle_keys app libs dirs keys_var)
endforeach()
endforeach()
+ # For each extra lib, accumulate a key as well and then also accumulate
+ # any of its prerequisites. (Extra libs are typically dynamically loaded
+ # plugins: libraries that are prerequisites for full runtime functionality
+ # but that do not show up in otool -L output...)
+ #
+ foreach(lib ${libs})
+ set_bundle_key_values(${keys_var} "${lib}" "${lib}" "${executable}" "${dirs}" 0)
+
+ set(prereqs "")
+ get_prerequisites("${lib}" prereqs 1 1 "${executable}" "${dirs}")
+ foreach(pr ${prereqs})
+ set_bundle_key_values(${keys_var} "${lib}" "${pr}" "${executable}" "${dirs}" 1)
+ endforeach()
+ endforeach()
+
# Propagate values to caller's scope:
#
set(${keys_var} ${${keys_var}} PARENT_SCOPE)
--
1.9.3 (Apple Git-50)
More information about the cmake-developers
mailing list