aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-11-18 10:55:21 +0100
committerEike Ziller <eike.ziller@qt.io>2020-11-18 11:11:22 +0000
commit2422a90f1e27e74f9915a1d543689aa64b74ccdb (patch)
tree57c40d8720ef1a21124c140f13a3f19c31f2adc9 /cmake
parentf88deb5b70723fccb8e5b624a987b452d3005e14 (diff)
cmake build/macOS: Fix installing when built with Qt6
In a framework the actual library can be accessed via two different paths: - Foo.framework/Foo - Foo.framework/Versions/A/Foo It happens that Qt5 exports the first variant for the framework LOCATION and Qt6 exports the second variant. We want to cut the whole "Foo.framework" part for the framework's location, so actually do that. Amends 98db9774f2363314f51b1732646396112418320e Change-Id: Idad12e92f2bfbdc480256a832320c4dec76a0e5f Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCreatorAPI.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index d1f492b6c5..3b02eeda2d 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -687,7 +687,8 @@ function(add_qtc_executable name)
get_target_property(_location ${_lib} LOCATION)
get_target_property(_is_framework ${_lib} FRAMEWORK)
if (_is_framework)
- set(_location ${_location}/../..)
+ # get rid of the whole Foo.framework/* part whereever it is
+ string(REGEX REPLACE "/[^/]*[.]framework/.*" "" _location ${_location})
endif()
get_filename_component(_abs_location ${_location} ABSOLUTE)
list(APPEND _rpaths_to_remove "${_abs_location}")