CMake: Fix usage of debug frameworks on macOS
If an app wants use a debug framework of Qt, it is still expected that the app should link against the release version, and just set DYLD_IMAGE_SUFFIX=_debug when running the app. This was not the case before, where the CMake Config files told CMake to link explicitly against the debug libraries. This caused crashes due to the Qt plugin loader mechanism still trying to find a release platform plugin, which in turn would load release libraries, and thus the application would end up loading both debug and release plugins. Make sure the Config files in a framework case always reference the release libraries (even though this might be counter intuitive). Otherwise users of the Debug Config files would always get crashes. Fixes: QTBUG-78131 Fixes: QTBUG-78239 Change-Id: I88b1dc421477ad186012ca67b328a891128eb568 (cherry picked from commit be21ff11b7c25e3f6682c7987052557eca48e907) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
3a50e51b01
commit
afec5935ea
@ -228,7 +228,8 @@ mac {
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
||||
} else {
|
||||
qt_framework {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
|
||||
# Intentionally there is no '_debug' infix for framework builds.
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user