CMake: Use the PRODUCT_NAME for the iOS display name like qmake
This ensures that the Xcode 'Display name' input under ${target} -> General -> Identity -> Display name is not empty. Because adding ${PRODUCT_NAME} directly in the Info.plist.in template will cause CMake to evaluate it as variable expansion, work around the issue by putting the dollar sign into a separate cache variable that after evaluation will result in ${PRODUCT_NAME} being in the file verbatim, so that Xcode evaluate it at build time. Amends 4d838dae5a821e9e5f013ba1d5a494ece1b5180e Pick-to: 6.2 6.3 Task-number: QTBUG-95838 Change-Id: I2d1090cc8e84b32442f7daca2d4ce5e3ad413c68 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
c0188b2dbd
commit
55eb94cdbd
@ -4,18 +4,25 @@
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${QT_INTERNAL_DOLLAR_VAR}{PRODUCT_NAME}</string>
|
||||
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
|
||||
|
@ -1036,12 +1036,23 @@ function(_qt_internal_set_xcode_code_sign_style target)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(_qt_internal_set_xcode_bundle_display_name target)
|
||||
# We want the value of CFBundleDisplayName to be ${PRODUCT_NAME}, but we can't put that
|
||||
# into the Info.plist.in template file directly, because the implicit configure_file(Info.plist)
|
||||
# done by CMake is not using the @ONLY option, so CMake would treat the assignment as
|
||||
# variable expansion. Escaping using backslashes does not help.
|
||||
# Work around it by assigning the dollar char to a separate cache var, and expand it, so that
|
||||
# the final value in the file will be ${PRODUCT_NAME}, to be evaluated at build time by Xcode.
|
||||
set(QT_INTERNAL_DOLLAR_VAR "$" CACHE STRING "")
|
||||
endfunction()
|
||||
|
||||
function(_qt_internal_finalize_ios_app target)
|
||||
_qt_internal_set_xcode_development_team_id("${target}")
|
||||
_qt_internal_set_xcode_bundle_identifier("${target}")
|
||||
_qt_internal_set_xcode_product_bundle_identifier("${target}")
|
||||
_qt_internal_set_xcode_targeted_device_family("${target}")
|
||||
_qt_internal_set_xcode_code_sign_style("${target}")
|
||||
_qt_internal_set_xcode_bundle_display_name("${target}")
|
||||
|
||||
_qt_internal_handle_ios_launch_screen("${target}")
|
||||
_qt_internal_set_placeholder_apple_bundle_version("${target}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user