-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared_library_patch.txt
63 lines (58 loc) · 1.62 KB
/
shared_library_patch.txt
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff --git a/BUILD.gn b/BUILD.gn
index bb650b634..d62c687e7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -17,10 +17,14 @@ group("freetype_common") {
config("pdfium_common_config") {
cflags = []
ldflags = []
- include_dirs = [ "." ]
+ include_dirs = [
+ ".",
+ "v8/include",
+ ]
defines = [
"PNG_PREFIX",
"PNG_USE_READ_MACROS",
+ "FPDFSDK_EXPORTS",
]
if (!use_system_libopenjpeg2) {
@@ -149,7 +153,7 @@ group("pdfium_public_headers") {
]
}
-component("pdfium") {
+shared_library("pdfium") {
libs = []
configs += [ ":pdfium_core_config" ]
public_configs = [ ":pdfium_public_config" ]
diff --git a/public/fpdfview.h b/public/fpdfview.h
index 27df9bd0b..2eb40d4dd 100644
--- a/public/fpdfview.h
+++ b/public/fpdfview.h
@@ -176,9 +176,6 @@ typedef int FPDF_ANNOT_APPEARANCEMODE;
// Dictionary value types.
typedef int FPDF_OBJECT_TYPE;
-#if defined(COMPONENT_BUILD)
-// FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer
-// template in testing/fuzzers/BUILD.gn.
#if defined(WIN32)
#if defined(FPDF_IMPLEMENTATION)
#define FPDF_EXPORT __declspec(dllexport)
@@ -192,9 +189,6 @@ typedef int FPDF_OBJECT_TYPE;
#define FPDF_EXPORT
#endif // defined(FPDF_IMPLEMENTATION)
#endif // defined(WIN32)
-#else
-#define FPDF_EXPORT
-#endif // defined(COMPONENT_BUILD)
#if defined(WIN32) && defined(FPDFSDK_EXPORTS)
#define FPDF_CALLCONV __stdcall
--- a/fpdfsdk/BUILD.gn
+++ b/fpdfsdk/BUILD.gn
@@ -70,6 +70,7 @@ source_set("fpdfsdk") {
"fpdf_transformpage.cpp",
"fpdf_view.cpp",
"ipdfsdk_annothandler.h",
+ "pdfiumviewer.cpp",
]
configs += [ "../:pdfium_core_config" ]