summaryrefslogtreecommitdiff
path: root/Modules/BundleUtilities.cmake
diff options
context:
space:
mode:
authorEmilie Harquel <emilie.har@gmail.com>2015-12-16 14:12:56 +0100
committerBrad King <brad.king@kitware.com>2015-12-17 10:56:27 -0500
commita479d7a0ae1583e0e9471e747393839f1af6a593 (patch)
treeb618bc00503e3f101fca934f1bbecd9f829bf7d4 /Modules/BundleUtilities.cmake
parent2913876c58daec60fec24c6b47c16c3d13b28405 (diff)
downloadcmake-a479d7a0ae1583e0e9471e747393839f1af6a593.tar.gz
BundleUtilities: Fix handling of multiple RPATHs from OS X otool
The `otool` command may return multiple RPATH entires, so call `gp_append_unique` for each one. Otherwise we may try to ask `install_name_tool` to deal with the same entry twice.
Diffstat (limited to 'Modules/BundleUtilities.cmake')
-rw-r--r--Modules/BundleUtilities.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index b7975d3eaa..45dda40c87 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -424,7 +424,9 @@ function(get_item_rpaths item rpaths_var)
string(REGEX MATCHALL "rpath [^\n]+" load_cmds_ov "${load_cmds_ov}")
string(REGEX REPLACE "rpath " "" load_cmds_ov "${load_cmds_ov}")
if(load_cmds_ov)
- gp_append_unique(${rpaths_var} "${load_cmds_ov}")
+ foreach(rpath ${load_cmds_ov})
+ gp_append_unique(${rpaths_var} "${rpath}")
+ endforeach()
endif()
endif()