diff options
author | Harry Mallon <hjmallon@gmail.com> | 2018-07-22 11:05:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-07-24 18:07:22 (GMT) |
commit | dce77d9ad99f5f57f22cb9e259e685c12ca0281f (patch) | |
tree | 448bfcb5a162b4c57fc2c7ee8dd918623de402a3 /Modules | |
parent | c2d22dc4b44c8a5115fbe6797bb44ae478971601 (diff) | |
download | CMake-dce77d9ad99f5f57f22cb9e259e685c12ca0281f.zip CMake-dce77d9ad99f5f57f22cb9e259e685c12ca0281f.tar.gz CMake-dce77d9ad99f5f57f22cb9e259e685c12ca0281f.tar.bz2 |
GetPrerequisites: Move dylibs from MacOS to Frameworks folder in bundle
Fixes: #16828
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index d397791..ca71009 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -275,7 +275,6 @@ function(gp_item_default_embedded_path item default_embedded_path_var) # as the executable by default: # set(path "@executable_path") - set(overridden 0) # On the Mac, relative to the executable depending on the type # of the thing we are embedding: @@ -294,20 +293,11 @@ function(gp_item_default_embedded_path item default_embedded_path_var) # set(path "@executable_path/../../Contents/MacOS") - # Embed .dylibs right next to the main bundle executable: + # Embed frameworks and .dylibs in the embedded "Frameworks" directory + # (sibling of MacOS): # - if(item MATCHES "\\.dylib$") - set(path "@executable_path/../MacOS") - set(overridden 1) - endif() - - # Embed frameworks in the embedded "Frameworks" directory (sibling of MacOS): - # - if(NOT overridden) - if(item MATCHES "[^/]+\\.framework/") - set(path "@executable_path/../Frameworks") - set(overridden 1) - endif() + if(item MATCHES "[^/]+\\.framework/" OR item MATCHES "\\.dylib$") + set(path "@executable_path/../Frameworks") endif() endif() |