diff options
author | Michal Klocek <michal.klocek@qt.io> | 2022-04-07 11:38:18 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-04-30 22:37:34 +0000 |
commit | 90fd9824657900c41f5e58a02b6813127ef2a543 (patch) | |
tree | 79b903bcf2ba380d27a8ff411554fa3fe8033f0e | |
parent | 70d80548a62d64fe177cf85191a48220e0117892 (diff) |
Fix missing dictionaries in case of user bundles
If user creates bundle dictionaries should be copied
to Resources in the bundle.
Note our spellchecker unit test only covers non bundle case.
Fixes: QTBUG-100799
Change-Id: I5d4c0f7c1c21d35601a6e01dec1ecdb43202469f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit ef86f293d2d3778301536da1548884e9e2ca2093)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/core/api/Qt6WebEngineCoreMacros.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/api/Qt6WebEngineCoreMacros.cmake b/src/core/api/Qt6WebEngineCoreMacros.cmake index af71063f2..efb34882b 100644 --- a/src/core/api/Qt6WebEngineCoreMacros.cmake +++ b/src/core/api/Qt6WebEngineCoreMacros.cmake @@ -14,11 +14,18 @@ function(qt6_add_webengine_dictionary) endif() get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + get_target_property(isBundle ${ARGS_TARGET} MACOSX_BUNDLE) if(isMultiConfig) set(spellcheckerDir ${ARGS_OUTPUT_DIRECTORY}/dict/qtwebengine_dictionaries) set(copyCommand COMMAND ${CMAKE_COMMAND} -E copy_directory ${ARGS_OUTPUT_DIRECTORY}/dict ${ARGS_OUTPUT_DIRECTORY}/$<CONFIG> ) + elseif(isBundle) + get_target_property(outputName ${ARGS_TARGET} OUTPUT_NAME) + if(NOT outputName) + set(outputName ${ARGS_TARGET}) + endif() + set(spellcheckerDir "${ARGS_OUTPUT_DIRECTORY}/${outputName}.app/Contents/Resources/qtwebengine_dictionaries") else() set(spellcheckerDir ${ARGS_OUTPUT_DIRECTORY}/qtwebengine_dictionaries) endif() |