Use 'A' for Apple framework version instead of Qt major version

All system frameworks use 'A' instead of the major version of the
framework, and Xcode's code signing assumes that the framework version
is 'A' when signing embedded frameworks (FB7323980), so leave the
version 'A'. This is also what Apple recommends.

Change-Id: Idbf2e30e156c3e869da8f75731e568524d9407e5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-07-22 15:44:43 +02:00
parent be2635b8dd
commit 5c1ed8bb74
4 changed files with 7 additions and 6 deletions

View File

@ -47,7 +47,7 @@ function(qt_internal_find_apple_system_framework out_var framework_name)
endif() endif()
endfunction() endfunction()
# Copy header files to QtXYZ.framework/Versions/6/Headers/ # Copy header files to QtXYZ.framework/Versions/A/Headers/
# Use this function for header files that # Use this function for header files that
# - are not added as source files to the target # - are not added as source files to the target
# - are not marked as PUBLIC_HEADER # - are not marked as PUBLIC_HEADER

View File

@ -54,7 +54,7 @@ function(qt_internal_add_module target)
set(is_framework 1) set(is_framework 1)
set_target_properties(${target} PROPERTIES set_target_properties(${target} PROPERTIES
FRAMEWORK TRUE FRAMEWORK TRUE
FRAMEWORK_VERSION ${PROJECT_VERSION_MAJOR} FRAMEWORK_VERSION "A" # Not based on Qt major version
MACOSX_FRAMEWORK_IDENTIFIER org.qt-project.Qt${target} MACOSX_FRAMEWORK_IDENTIFIER org.qt-project.Qt${target}
MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_FRAMEWORK_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}

View File

@ -128,7 +128,7 @@ else: \
lib_bundle { lib_bundle {
# Set the CFBundleIdentifier prefix for Qt frameworks # Set the CFBundleIdentifier prefix for Qt frameworks
QMAKE_TARGET_BUNDLE_PREFIX = org.qt-project QMAKE_TARGET_BUNDLE_PREFIX = org.qt-project
#QMAKE_FRAMEWORK_VERSION = 4.0 QMAKE_FRAMEWORK_VERSION = "A" # Not based on Qt major version
CONFIG += sliced_bundle CONFIG += sliced_bundle
header_module { header_module {
CONFIG += bundle CONFIG += bundle

View File

@ -56,9 +56,10 @@ win32 {
framework_ext = $$QMAKE_BUNDLE_EXTENSION framework_ext = $$QMAKE_BUNDLE_EXTENSION
QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${framework_target}$${framework_ext} QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${framework_target}$${framework_ext}
!shallow_bundle { !shallow_bundle {
TEMP_VERSION = $$section(VERSION, ., 0, 0) framework_version = $$QMAKE_FRAMEWORK_VERSION
isEmpty(TEMP_VERSION):TEMP_VERSION = A isEmpty(framework_version):framework_version = $$section(VERSION, ., 0, 0)
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${TEMP_VERSION}/$${TARGET} isEmpty(framework_version):framework_version = A
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${framework_version}/$${TARGET}
} else { } else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/$${TARGET} QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/$${TARGET}
} }