aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/qtwebengine/include-dir-order.diff
blob: 093cd445c856d55b54357c3a06519248aa7d25e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/src/core/configure/BUILD.root.gn.in b/src/core/configure/BUILD.root.gn.in
index 214ef6e715..8b76e08309 100644
--- a/src/core/configure/BUILD.root.gn.in
+++ b/src/core/configure/BUILD.root.gn.in
@@ -74,11 +74,22 @@ config("QtWebEngineCore_config") {
   defines = [
     @GN_DEFINES@,
   ]
+  # Don't let <vcpkg-installed>/include appear in QtWebEngineCore_config:
+  # vendored dependencies (protobuf, dawn, skia, ...) have inter-dependencies
+  # which must not accidentally pick headers from installed ports.
+  # Instead, attach these includes to a source_set used as another dependency.
+}
+config("QtWebEngineCore_include_dirs_config") {
   include_dirs = [
     @GN_INCLUDE_DIRS@,
     rebase_path("${target_gen_dir}/.moc/")
   ]
 }
+source_set("QtWebEngineCore_include_dirs") {
+  public_configs = [
+    ":QtWebEngineCore_include_dirs_config"
+  ]
+}
 
 declare_args() {
   use_embedded_config = false
@@ -214,6 +225,8 @@ shared_library("QtWebEngineCore") {
       "//tools/v8_context_snapshot:v8_context_snapshot"
     ]
   }
+  # Complements QtWebEngineCore_config modifcation
+  deps += [ ":QtWebEngineCore_include_dirs" ]
 }
 
 source_set("qtwebengine_spellcheck_sources") {
@@ -571,6 +584,8 @@ if (is_win) {
       "@GN_SOURCE_ROOT@/sandbox_win.cpp"
     ]
     public_deps = [ "//sandbox/win:sandbox" ]
+    # Complements QtWebEngineCore_config modifcation
+    deps = [ ":QtWebEngineCore_include_dirs" ]
   }
 }