Updates Android.bp for new pdfium
Rewrite Android.bp to follow the new BUILD.gn structure.
Will try to set up auto update in following changes.
Bug: 155031873
Change-Id: I4a0632e1f5220ecbd257153a647b594a038f1229
Merged-Id: I4a0632e1f5220ecbd257153a647b594a038f1229
diff --git a/core/fdrm/Android.bp b/core/fdrm/Android.bp
new file mode 100644
index 0000000..c35475a
--- /dev/null
+++ b/core/fdrm/Android.bp
@@ -0,0 +1,19 @@
+cc_library_static {
+ name: "libpdfium-fdrm",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ static_libs: [
+ "libpdfium-fxcrt",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+
+ include_dirs: [
+ "external/freetype/include",
+ "external/freetype/include/freetype",
+ ],
+}
diff --git a/core/fpdfapi/cmaps/Android.bp b/core/fpdfapi/cmaps/Android.bp
new file mode 100644
index 0000000..e2d5067
--- /dev/null
+++ b/core/fpdfapi/cmaps/Android.bp
@@ -0,0 +1,14 @@
+cc_library_static {
+ name: "libpdfium-cmaps",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ static_libs: [
+ "libpdfium-fxcrt",
+ ],
+
+ srcs: [
+ "**/*.cpp",
+ ],
+}
diff --git a/core/fpdfapi/edit/Android.bp b/core/fpdfapi/edit/Android.bp
new file mode 100644
index 0000000..bbd2b63
--- /dev/null
+++ b/core/fpdfapi/edit/Android.bp
@@ -0,0 +1,22 @@
+cc_library_static {
+ name: "libpdfium-edit",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ header_libs: [
+ "libpdfium-constants",
+ ],
+
+ static_libs: [
+ "libpdfium-fxcrt",
+ "libpdfium-font",
+ "libpdfium-page",
+ "libpdfium-parser",
+ "libpdfium-skia_shared",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fpdfapi/font/Android.bp b/core/fpdfapi/font/Android.bp
new file mode 100644
index 0000000..c4054f4
--- /dev/null
+++ b/core/fpdfapi/font/Android.bp
@@ -0,0 +1,17 @@
+cc_library_static {
+ name: "libpdfium-font",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ static_libs: [
+ "libpdfium-fxcrt",
+ "libpdfium-fxge",
+ "libpdfium-cmaps",
+ "libpdfium-parser",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fpdfapi/page/Android.bp b/core/fpdfapi/page/Android.bp
new file mode 100644
index 0000000..650e4f8
--- /dev/null
+++ b/core/fpdfapi/page/Android.bp
@@ -0,0 +1,22 @@
+cc_library_static {
+ name: "libpdfium-page",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ header_libs: [
+ "libpdfium-constants",
+ ],
+
+ static_libs: [
+ "libpdfium-fxcodec",
+ "libpdfium-fxcrt",
+ "libpdfium-fxge",
+ "libpdfium-font",
+ "libpdfium-parser",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fpdfapi/parser/Android.bp b/core/fpdfapi/parser/Android.bp
new file mode 100644
index 0000000..6864dfa
--- /dev/null
+++ b/core/fpdfapi/parser/Android.bp
@@ -0,0 +1,25 @@
+cc_library_static {
+ name: "libpdfium-parser",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ header_libs: [
+ "libpdfium-constants",
+ ],
+
+ static_libs: [
+ "libpdfium-fdrm",
+ "libpdfium-fxcodec",
+ "libpdfium-fxcrt",
+ ],
+
+ exclude_srcs: [
+ // pdf_enable_xfa
+ "cpdf_seekablemultistream.cpp",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fpdfapi/render/Android.bp b/core/fpdfapi/render/Android.bp
new file mode 100644
index 0000000..60818b5
--- /dev/null
+++ b/core/fpdfapi/render/Android.bp
@@ -0,0 +1,28 @@
+cc_library_static {
+ name: "libpdfium-render",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ header_libs: [
+ "libpdfium-constants",
+ ],
+
+ static_libs: [
+ "libpdfium-fxcodec",
+ "libpdfium-fxcrt",
+ "libpdfium-fxge",
+ "libpdfium-font",
+ "libpdfium-page",
+ "libpdfium-parser",
+ ],
+
+ exclude_srcs: [
+ // is_win
+ "cpdf_windowsrenderdevice.cpp",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fpdfdoc/Android.bp b/core/fpdfdoc/Android.bp
new file mode 100644
index 0000000..5bb33ea
--- /dev/null
+++ b/core/fpdfdoc/Android.bp
@@ -0,0 +1,23 @@
+cc_library_static {
+ name: "libpdfium-fpdfdoc",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ header_libs: [
+ "libpdfium-constants",
+ ],
+
+ static_libs: [
+ "libpdfium-font",
+ "libpdfium-page",
+ "libpdfium-parser",
+ "libpdfium-render",
+ "libpdfium-fxcrt",
+ "libpdfium-fxge",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fpdftext/Android.bp b/core/fpdftext/Android.bp
new file mode 100644
index 0000000..711f35d
--- /dev/null
+++ b/core/fpdftext/Android.bp
@@ -0,0 +1,17 @@
+cc_library_static {
+ name: "libpdfium-fpdftext",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ static_libs: [
+ "libpdfium-font",
+ "libpdfium-page",
+ "libpdfium-parser",
+ "libpdfium-fxcrt",
+ ],
+
+ srcs: [
+ "*.cpp",
+ ],
+}
diff --git a/core/fxcodec/Android.bp b/core/fxcodec/Android.bp
new file mode 100644
index 0000000..b5d78d1
--- /dev/null
+++ b/core/fxcodec/Android.bp
@@ -0,0 +1,35 @@
+cc_library_static {
+ name: "libpdfium-fxcodec",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ static_libs: [
+ "libpdfium-lcms2",
+ "libpdfium-libopenjpeg2",
+ "libpdfium-fxcrt",
+ "libpdfium-fxge",
+ ],
+
+ shared_libs: [
+ "libz",
+ "libjpeg",
+ ],
+
+ exclude_srcs: [
+ // pdf_enable_xfa
+ "progressivedecoder.cpp",
+ // pdf_enable_xfa_bmp
+ "bmp/*",
+ // pdf_enable_xfa_gif
+ "gif/*",
+ // pdf_enable_xfa_png
+ "png/*",
+ // pdf_enable_xfa_tiff
+ "tiff/*",
+ ],
+
+ srcs: [
+ "**/*.cpp",
+ ],
+}
diff --git a/core/fxcrt/Android.bp b/core/fxcrt/Android.bp
new file mode 100644
index 0000000..cfbe939
--- /dev/null
+++ b/core/fxcrt/Android.bp
@@ -0,0 +1,34 @@
+cc_library_static {
+ name: "libpdfium-fxcrt",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ header_libs: [
+ "libandroidicu_headers",
+ ],
+
+ export_header_lib_headers: [
+ "libandroidicu_headers",
+ ],
+
+ static_libs: [
+ "libpdfium-third_party-base",
+ ],
+
+ shared_libs: [
+ "libandroidicu",
+ ],
+
+ exclude_srcs: [
+ // is_win
+ "cfx_fileaccess_windows.cpp",
+ // pdf_enable_xfa
+ "cfx_memorystream.cpp",
+ ],
+
+ srcs: [
+ "*.cpp",
+ "xml/*.cpp",
+ ],
+}
diff --git a/core/fxge/Android.bp b/core/fxge/Android.bp
new file mode 100644
index 0000000..fe648c6
--- /dev/null
+++ b/core/fxge/Android.bp
@@ -0,0 +1,36 @@
+cc_library_static {
+ name: "libpdfium-fxge",
+ defaults: ["pdfium-core"],
+
+ visibility: ["//external/pdfium:__subpackages__"],
+
+ static_libs: [
+ "libpdfium-agg",
+ "libpdfium-fxcrt",
+ ],
+
+ exclude_srcs: [
+ // pdf_enable_xfa
+ "cfx_unicodeencodingex.cpp",
+ // is_win
+ "dib/cfx_dibextractor.cpp",
+ // is_linux
+ "fx_ge_linux.cpp",
+ ],
+
+ srcs: [
+ "*.cpp",
+ "dib/*.cpp",
+ "freetype/*.cpp",
+ "fontdata/**/*.cpp",
+ // !pdf_use_skia
+ "agg/*.cpp",
+ // is_android
+ "android/*.cpp",
+ ],
+
+ include_dirs: [
+ "external/freetype/include",
+ "external/freetype/include/freetype",
+ ],
+}