summaryrefslogtreecommitdiffstats
path: root/src/core/core_generator.pro
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_generator.pro')
-rw-r--r--src/core/core_generator.pro10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/core_generator.pro b/src/core/core_generator.pro
index e1e7ab1d9..ed47a47e9 100644
--- a/src/core/core_generator.pro
+++ b/src/core/core_generator.pro
@@ -12,7 +12,15 @@ include(core_common.pri)
macos {
# This fixes namespace builds on macOS. Specifically namespace ambiguity issues between Qt and
# Chromium forward declarations of NSString.
- forward_declaration_macro = $$shell_quote(\"Q_FORWARD_DECLARE_OBJC_CLASS(name)=class name;\")
+ contains(WEBENGINE_CONFIG, use_gn) {
+ # The single quotes are present so that qmake iteration does not interpret the space as
+ # delimiting a new value, they are removed before writing to the GN file, and the final shell
+ # quoting is done by GN itself.
+ forward_declaration_macro = "'Q_FORWARD_DECLARE_OBJC_CLASS(name)=class name;'"
+ } else {
+ # For GYP, quoting should be done by qmake itself.
+ forward_declaration_macro = $$shell_quote(\"Q_FORWARD_DECLARE_OBJC_CLASS(name)=class name;\")
+ }
} else {
forward_declaration_macro = "Q_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS"
}