Split public/ headers into their own source_set.
This removes some allow_circular_includes_from entries.
Change-Id: I276d211a0f45f460b4814560533f0cb83d681613
Reviewed-on: https://pdfium-review.googlesource.com/c/43994
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 65d9b33..14cf737 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -91,6 +91,32 @@
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
}
+jumbo_source_set("pdfium_public_headers") {
+ sources = [
+ "public/cpp/fpdf_deleters.h",
+ "public/cpp/fpdf_scopers.h",
+ "public/fpdf_annot.h",
+ "public/fpdf_attachment.h",
+ "public/fpdf_catalog.h",
+ "public/fpdf_dataavail.h",
+ "public/fpdf_doc.h",
+ "public/fpdf_edit.h",
+ "public/fpdf_ext.h",
+ "public/fpdf_flatten.h",
+ "public/fpdf_formfill.h",
+ "public/fpdf_fwlevent.h",
+ "public/fpdf_ppo.h",
+ "public/fpdf_progressive.h",
+ "public/fpdf_save.h",
+ "public/fpdf_searchex.h",
+ "public/fpdf_structtree.h",
+ "public/fpdf_sysfontinfo.h",
+ "public/fpdf_text.h",
+ "public/fpdf_transformpage.h",
+ "public/fpdfview.h",
+ ]
+}
+
jumbo_static_library("pdfium") {
sources = [
"fpdfsdk/fpdf_annot.cpp",
@@ -114,33 +140,13 @@
"fpdfsdk/fpdf_text.cpp",
"fpdfsdk/fpdf_transformpage.cpp",
"fpdfsdk/fpdf_view.cpp",
- "public/cpp/fpdf_deleters.h",
- "public/cpp/fpdf_scopers.h",
- "public/fpdf_annot.h",
- "public/fpdf_attachment.h",
- "public/fpdf_catalog.h",
- "public/fpdf_dataavail.h",
- "public/fpdf_doc.h",
- "public/fpdf_edit.h",
- "public/fpdf_ext.h",
- "public/fpdf_flatten.h",
- "public/fpdf_formfill.h",
- "public/fpdf_fwlevent.h",
- "public/fpdf_ppo.h",
- "public/fpdf_progressive.h",
- "public/fpdf_save.h",
- "public/fpdf_searchex.h",
- "public/fpdf_structtree.h",
- "public/fpdf_sysfontinfo.h",
- "public/fpdf_text.h",
- "public/fpdf_transformpage.h",
- "public/fpdfview.h",
]
libs = []
configs += [ ":pdfium_core_config" ]
deps = [
+ ":pdfium_public_headers",
"constants",
"core/fdrm",
"core/fpdfapi",
@@ -161,13 +167,9 @@
"third_party:pdfium_base",
"third_party:skia_shared",
]
- allow_circular_includes_from = [
- "fpdfsdk",
- "fpdfsdk/formfiller",
- "fpdfsdk/pwl",
- ]
public_deps = [
+ ":pdfium_public_headers",
"core/fxcrt",
]
@@ -178,7 +180,6 @@
"xfa/fxfa",
"xfa/fxfa/parser",
]
- allow_circular_includes_from += [ "fpdfsdk/fpdfxfa" ]
}
if (is_win) {
diff --git a/fpdfsdk/BUILD.gn b/fpdfsdk/BUILD.gn
index 0a696d3..bf80636 100644
--- a/fpdfsdk/BUILD.gn
+++ b/fpdfsdk/BUILD.gn
@@ -51,6 +51,7 @@
configs += [ "../:pdfium_core_config" ]
deps = [
+ "../:pdfium_public_headers",
"../core/fpdfapi",
"../core/fpdfapi/page",
"../core/fpdfapi/parser",
diff --git a/fpdfsdk/formfiller/BUILD.gn b/fpdfsdk/formfiller/BUILD.gn
index 434e580..a16ee51 100644
--- a/fpdfsdk/formfiller/BUILD.gn
+++ b/fpdfsdk/formfiller/BUILD.gn
@@ -32,6 +32,7 @@
]
configs += [ "../../:pdfium_core_config" ]
deps = [
+ "../../:pdfium_public_headers",
"../../core/fpdfapi/font",
"../../core/fpdfapi/page",
"../../core/fpdfapi/parser",
diff --git a/fpdfsdk/fpdfxfa/BUILD.gn b/fpdfsdk/fpdfxfa/BUILD.gn
index a1c6170..d59c237 100644
--- a/fpdfsdk/fpdfxfa/BUILD.gn
+++ b/fpdfsdk/fpdfxfa/BUILD.gn
@@ -19,6 +19,7 @@
"cxfa_fwladaptertimermgr.h",
]
deps = [
+ "../../:pdfium_public_headers",
"../../core/fpdfapi/page",
"../../core/fpdfapi/parser",
"../../core/fxcrt",
diff --git a/fpdfsdk/pwl/BUILD.gn b/fpdfsdk/pwl/BUILD.gn
index c5e0268..c600647 100644
--- a/fpdfsdk/pwl/BUILD.gn
+++ b/fpdfsdk/pwl/BUILD.gn
@@ -42,6 +42,7 @@
]
configs += [ "../../:pdfium_core_config" ]
deps = [
+ "../../:pdfium_public_headers",
"../../core/fpdfapi",
"../../core/fpdfapi/font",
"../../core/fpdfapi/page",