Make build work when enable_pdf is set to false.
Wrap more build targets with enable_pdf checks, or use enable_pdf rather
than enable_plugins. Add/adjust ifdefs in a few .cc files so they
compile. In the future, enable_pdf and enable_plugins may no longer be
coupled.
Change-Id: I6151bd927b42d078767d01b5e78a37be35f460fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2899417
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Daniel Hosseinian <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#884227}
diff --git a/BUILD.gn b/BUILD.gn
index 21298781..36d6fa5 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -24,6 +24,7 @@
import("//gpu/vulkan/features.gni")
import("//media/gpu/args.gni")
import("//media/media_options.gni")
+import("//pdf/features.gni")
import("//remoting/remoting_enable.gni")
import("//third_party/closure_compiler/compile_js.gni")
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
@@ -164,7 +165,6 @@
"//ppapi/examples/video_decode",
"//ppapi/examples/video_encode",
"//printing:printing_unittests",
- "//third_party/pdfium/samples:pdfium_test",
"//third_party/vulkan-deps/spirv-tools/src:SPIRV-Tools",
"//third_party/vulkan-deps/spirv-tools/src/test/fuzzers",
"//tools/perf/clear_system_cache",
@@ -281,6 +281,10 @@
]
}
+ if (enable_pdf) {
+ deps += [ "//third_party/pdfium/samples:pdfium_test" ]
+ }
+
if (enable_remoting) {
deps += [ "//remoting:remoting_all" ]
}