aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-20 18:57:01 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-08-20 18:57:01 +0000
commit327c081e4b908b0124d07cf94abfa8ed067d348e (patch)
treeec047beb1c41774fc1ba280abfad35b420c9563a /gyp
parent139484095f014ab08265c32337fddeeec6c0877d (diff)
Add libpoppler for PDF rendering, take 2
R=vandebo@chromium.org, edisonn@google.com Author: richardlin@chromium.org Review URL: https://chromiumcodereview.appspot.com/23301009 git-svn-id: http://skia.googlecode.com/svn/trunk@10833 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r--gyp/fontconfig.gyp101
-rw-r--r--gyp/freetype.gyp82
-rw-r--r--gyp/freetype.gypi65
-rw-r--r--gyp/gm.gyp11
-rw-r--r--gyp/iconv.gyp44
-rw-r--r--gyp/poppler.gyp229
6 files changed, 479 insertions, 53 deletions
diff --git a/gyp/fontconfig.gyp b/gyp/fontconfig.gyp
new file mode 100644
index 0000000000..94f6e4e009
--- /dev/null
+++ b/gyp/fontconfig.gyp
@@ -0,0 +1,101 @@
+# GYP for fontconfig (
+#
+# This has been tested on Windows and Mac.
+# This library is native to Linux, so build from source is not necessary.
+#
+# Additional files for building under Windows are provided here: (LGPL)
+# http://comments.gmane.org/gmane.comp.fonts.fontconfig/4438
+
+{
+ 'variables': {
+ 'skia_warnings_as_errors': 0,
+ },
+ 'targets': [
+ {
+ 'target_name': 'fontconfig',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'freetype.gyp:freetype_poppler',
+ ],
+ 'include_dirs' : [
+ '../third_party/externals/fontconfig',
+
+ '../third_party/fontconfig/config',
+ '../third_party/fontconfig/config/src',
+ ],
+ 'sources': [
+ '../third_party/externals/fontconfig/src/fcatomic.c',
+ '../third_party/externals/fontconfig/src/fcblanks.c',
+ '../third_party/externals/fontconfig/src/fccache.c',
+ '../third_party/externals/fontconfig/src/fccfg.c',
+ '../third_party/externals/fontconfig/src/fccharset.c',
+ '../third_party/externals/fontconfig/src/fccompat.c',
+ '../third_party/externals/fontconfig/src/fcdbg.c',
+ '../third_party/externals/fontconfig/src/fcdefault.c',
+ '../third_party/externals/fontconfig/src/fcdir.c',
+ '../third_party/externals/fontconfig/src/fcfreetype.c',
+ '../third_party/externals/fontconfig/src/fcfs.c',
+ '../third_party/externals/fontconfig/src/fchash.c',
+ '../third_party/externals/fontconfig/src/fcinit.c',
+ '../third_party/externals/fontconfig/src/fclang.c',
+ '../third_party/externals/fontconfig/src/fclist.c',
+ '../third_party/externals/fontconfig/src/fcmatch.c',
+ '../third_party/externals/fontconfig/src/fcmatrix.c',
+ '../third_party/externals/fontconfig/src/fcname.c',
+ '../third_party/externals/fontconfig/src/fcobjs.c',
+ '../third_party/externals/fontconfig/src/fcpat.c',
+ '../third_party/externals/fontconfig/src/fcserialize.c',
+ '../third_party/externals/fontconfig/src/fcstat.c',
+ '../third_party/externals/fontconfig/src/fcstr.c',
+ '../third_party/externals/fontconfig/src/fcxml.c',
+ '../third_party/externals/fontconfig/src/ftglue.c',
+ ],
+ 'defines': [
+ 'HAVE_CONFIG_H',
+ ],
+ 'cflags': [
+ '-fPIC',
+ ],
+
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../third_party/externals/fontconfig',
+ ],
+ },
+
+ 'conditions': [
+ ['skia_os == "mac"', {
+ 'include_dirs': [
+ '../third_party/fontconfig/config/mac',
+ '../third_party/fontconfig/config/mac/src',
+ ],
+ 'defines': [
+ 'FC_CACHEDIR',
+ 'FONTCONFIG_PATH',
+ ],
+ 'libraries': [
+ '$(SDKROOT)/usr/lib/libexpat.dylib',
+ ],
+ 'xcode_settings': {
+ 'DYLIB_INSTALL_NAME_BASE': '@executable_path',
+ },
+ }],
+ ['skia_os == "win"', {
+ 'include_dirs': [
+ '../third_party/fontconfig/config/windows',
+ '../third_party/fontconfig/config/windows/src',
+ ],
+ 'sources!': [
+ '../third_party/externals/fontconfig/src/fccompat.c',
+ '../third_party/externals/fontconfig/src/fcxml.c',
+ ],
+ 'defines': [
+ # inline is not recognized in C and has to be __inline
+ 'inline=__inline',
+ ],
+ }],
+ ],
+ },
+ ],
+}
+
diff --git a/gyp/freetype.gyp b/gyp/freetype.gyp
index 91c92b7522..30afb064dc 100644
--- a/gyp/freetype.gyp
+++ b/gyp/freetype.gyp
@@ -46,69 +46,20 @@
# we are dependent upon PNG for color emoji glyphs
'images.gyp:images'
],
- 'sources': [
- # base components (required)
- '../third_party/externals/freetype/src/base/ftsystem.c',
- '../third_party/externals/freetype/src/base/ftinit.c',
- '../third_party/externals/freetype/src/base/ftdebug.c',
- '../third_party/externals/freetype/src/base/ftbase.c',
-
- '../third_party/externals/freetype/src/base/ftbbox.c', # recommended, see <freetype/ftbbox.h>
- '../third_party/externals/freetype/src/base/ftglyph.c', # recommended, see <freetype/ftglyph.h>
-
- '../third_party/externals/freetype/src/base/ftbitmap.c', # optional, see <freetype/ftbitmap.h>
- '../third_party/externals/freetype/src/base/ftfstype.c', # optional
- '../third_party/externals/freetype/src/base/ftgasp.c', # optional, see <freetype/ftgasp.h>
- '../third_party/externals/freetype/src/base/ftlcdfil.c', # optional, see <freetype/ftlcdfil.h>
- '../third_party/externals/freetype/src/base/ftmm.c', # optional, see <freetype/ftmm.h>
- '../third_party/externals/freetype/src/base/ftpatent.c', # optional
- '../third_party/externals/freetype/src/base/ftstroke.c', # optional, see <freetype/ftstroke.h>
- '../third_party/externals/freetype/src/base/ftsynth.c', # optional, see <freetype/ftsynth.h>
- '../third_party/externals/freetype/src/base/fttype1.c', # optional, see <freetype/t1tables.h>
- '../third_party/externals/freetype/src/base/ftwinfnt.c', # optional, see <freetype/ftwinfnt.h>
- '../third_party/externals/freetype/src/base/ftxf86.c', # optional, see <freetype/ftxf86.h>
-
- # font drivers (optional; at least one is needed)
- '../third_party/externals/freetype/src/cff/cff.c', # CFF/OpenType font driver
- '../third_party/externals/freetype/src/sfnt/sfnt.c', # SFNT files support (TrueType & OpenType)
- '../third_party/externals/freetype/src/truetype/truetype.c', # TrueType font driver
-
- # rasterizers (optional; at least one is needed for vector formats)
- '../third_party/externals/freetype/src/raster/raster.c', # monochrome rasterizer
- '../third_party/externals/freetype/src/smooth/smooth.c', # anti-aliasing rasterizer
-
- # auxiliary modules (optional)
- '../third_party/externals/freetype/src/autofit/autofit.c', # auto hinting module
- '../third_party/externals/freetype/src/pshinter/pshinter.c', # PS hinting module
- '../third_party/externals/freetype/src/psnames/psnames.c', # PostScript glyph names support
+ 'includes': [
+ # common freetype sources needed for both the base Skia build and the
+ # libpoppler build for testing only
+ 'freetype.gypi',
],
'include_dirs': [
'../third_party/freetype/include_overrides',
- '../third_party/externals/freetype/internal',
- '../third_party/externals/freetype/builds',
- '../third_party/externals/freetype/include',
- '../third_party/externals/freetype',
- ],
- 'cflags': [
- '-DFT2_BUILD_LIBRARY',
],
'direct_dependent_settings': {
'include_dirs': [
'../third_party/freetype/include_overrides',
- '../third_party/externals/freetype/include',
],
},
'conditions': [
- [ 'skia_warnings_as_errors', {
- 'cflags!': [
- '-Werror',
- ],
- }],
- [ 'skia_os == "mac"', {
- 'sources': [
- '../third_party/externals/freetype/src/base/ftmac.c', # only on the Macintosh
- ],
- }],
[ 'skia_os == "android"', {
# These flags are used by the Android OS. They are probably overkill
# for Skia, but we add them for consistency.
@@ -124,6 +75,31 @@
}],
],
},
+ {
+ 'target_name': 'freetype_poppler',
+ 'type': 'static_library',
+ 'standalone_static_library': 1,
+ 'includes': [
+ 'freetype.gypi',
+ ],
+ 'sources': [
+ # additional components used by poppler
+ '../third_party/externals/freetype/src/base/ftbdf.c',
+ '../third_party/externals/freetype/src/base/ftpfr.c',
+
+ '../third_party/externals/freetype/src/bdf/bdf.c',
+ '../third_party/externals/freetype/src/cid/type1cid.c',
+ '../third_party/externals/freetype/src/pcf/pcf.c',
+ '../third_party/externals/freetype/src/pfr/pfr.c',
+ '../third_party/externals/freetype/src/psaux/psaux.c',
+ '../third_party/externals/freetype/src/type1/type1.c',
+ '../third_party/externals/freetype/src/type42/type42.c',
+ '../third_party/externals/freetype/src/winfonts/winfnt.c',
+
+ '../third_party/externals/freetype/src/gzip/ftgzip.c',
+ '../third_party/externals/freetype/src/lzw/ftlzw.c',
+ ],
+ },
],
}
diff --git a/gyp/freetype.gypi b/gyp/freetype.gypi
new file mode 100644
index 0000000000..da33262c8e
--- /dev/null
+++ b/gyp/freetype.gypi
@@ -0,0 +1,65 @@
+{
+ 'sources': [
+ # base components (required)
+ '../third_party/externals/freetype/src/base/ftsystem.c',
+ '../third_party/externals/freetype/src/base/ftinit.c',
+ '../third_party/externals/freetype/src/base/ftdebug.c',
+ '../third_party/externals/freetype/src/base/ftbase.c',
+
+ '../third_party/externals/freetype/src/base/ftbbox.c', # recommended, see <freetype/ftbbox.h>
+ '../third_party/externals/freetype/src/base/ftglyph.c', # recommended, see <freetype/ftglyph.h>
+
+ '../third_party/externals/freetype/src/base/ftbitmap.c', # optional, see <freetype/ftbitmap.h>
+ '../third_party/externals/freetype/src/base/ftfstype.c', # optional
+ '../third_party/externals/freetype/src/base/ftgasp.c', # optional, see <freetype/ftgasp.h>
+ '../third_party/externals/freetype/src/base/ftlcdfil.c', # optional, see <freetype/ftlcdfil.h>
+ '../third_party/externals/freetype/src/base/ftmm.c', # optional, see <freetype/ftmm.h>
+ '../third_party/externals/freetype/src/base/ftpatent.c', # optional
+ '../third_party/externals/freetype/src/base/ftstroke.c', # optional, see <freetype/ftstroke.h>
+ '../third_party/externals/freetype/src/base/ftsynth.c', # optional, see <freetype/ftsynth.h>
+ '../third_party/externals/freetype/src/base/fttype1.c', # optional, see <freetype/t1tables.h>
+ '../third_party/externals/freetype/src/base/ftwinfnt.c', # optional, see <freetype/ftwinfnt.h>
+ '../third_party/externals/freetype/src/base/ftxf86.c', # optional, see <freetype/ftxf86.h>
+
+ # font drivers (optional; at least one is needed)
+ '../third_party/externals/freetype/src/cff/cff.c', # CFF/OpenType font driver
+ '../third_party/externals/freetype/src/sfnt/sfnt.c', # SFNT files support (TrueType & OpenType)
+ '../third_party/externals/freetype/src/truetype/truetype.c', # TrueType font driver
+
+ # rasterizers (optional; at least one is needed for vector formats)
+ '../third_party/externals/freetype/src/raster/raster.c', # monochrome rasterizer
+ '../third_party/externals/freetype/src/smooth/smooth.c', # anti-aliasing rasterizer
+
+ # auxiliary modules (optional)
+ '../third_party/externals/freetype/src/autofit/autofit.c', # auto hinting module
+ '../third_party/externals/freetype/src/pshinter/pshinter.c', # PS hinting module
+ '../third_party/externals/freetype/src/psnames/psnames.c', # PostScript glyph names support
+ ],
+ 'include_dirs': [
+ '../third_party/externals/freetype/internal',
+ '../third_party/externals/freetype/builds',
+ '../third_party/externals/freetype/include',
+ '../third_party/externals/freetype',
+ ],
+ 'defines': [
+ 'FT2_BUILD_LIBRARY',
+ ],
+ 'conditions': [
+ [ 'skia_warnings_as_errors', {
+ 'cflags!': [
+ '-Werror',
+ ],
+ }],
+ [ 'skia_os == "mac"', {
+ 'sources': [
+ '../third_party/externals/freetype/src/base/ftmac.c', # only on the Macintosh
+ ],
+ }],
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../third_party/externals/freetype/include',
+ ],
+ },
+}
+
diff --git a/gyp/gm.gyp b/gyp/gm.gyp
index 6608aba5dc..04efaa6f98 100644
--- a/gyp/gm.gyp
+++ b/gyp/gm.gyp
@@ -60,6 +60,17 @@
'pdf.gyp:pdf',
],
'conditions': [
+ ['skia_os in ["linux", "mac", "win"]', {
+ 'dependencies': [
+ 'poppler.gyp:libpoppler-cpp-gpl',
+ ],
+ 'sources': [
+ '../src/utils/SkPDFRasterizer.cpp',
+ ],
+ 'defines': [
+ 'SK_BUILD_POPPLER',
+ ],
+ }],
['skia_os == "mac"', {
'sources!': [
'../gm/system_preferences_default.cpp',
diff --git a/gyp/iconv.gyp b/gyp/iconv.gyp
new file mode 100644
index 0000000000..a727469cc2
--- /dev/null
+++ b/gyp/iconv.gyp
@@ -0,0 +1,44 @@
+# GYP for iconv
+#
+# NOTE: WINDOWS BUILD ONLY.
+# iconv should be native to Mac and Linux.
+#
+# Based on instructions found on http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio
+# See the relevant README.chromium file for more information.
+
+{
+ 'variables': {
+ 'skia_warnings_as_errors': 0,
+ },
+ 'targets': [
+ {
+ 'target_name': 'iconv',
+ 'type': 'static_library',
+ 'include_dirs' : [
+ '../third_party/externals/iconv/lib',
+ '../third_party/iconv/config',
+ ],
+ 'sources': [
+ '../third_party/externals/iconv/lib/iconv.c',
+ '../third_party/externals/iconv/libcharset/lib/localcharset.c',
+ ],
+
+ 'conditions': [
+ ['skia_os == "win"', {
+ 'include_dirs': [
+ '../third_party/iconv/config/windows',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../third_party/iconv/config/windows',
+ ],
+ },
+ 'defines': [
+ 'LIBDIR',
+ ],
+ }],
+ ],
+ },
+ ],
+}
+
diff --git a/gyp/poppler.gyp b/gyp/poppler.gyp
new file mode 100644
index 0000000000..7b1a0ccac5
--- /dev/null
+++ b/gyp/poppler.gyp
@@ -0,0 +1,229 @@
+# GYP for libpoppler, a PDF rendering library.
+#
+# !!! WARNING !!! Poppler is GPL software, and should not be used in anything
+# except testing code. Or the lawyercats won't be happy.
+#
+# libpoppler should be statically linked (doesn't have DLL exports),
+# but libpopper-cpp can be dynamically linked.
+
+{
+ 'variables': {
+ 'skia_warnings_as_errors': 0,
+ },
+ 'targets': [
+ {
+ 'target_name': 'libpoppler-gpl',
+ 'type': 'static_library',
+ 'include_dirs' : [
+ '../third_party/externals/poppler',
+ '../third_party/externals/poppler/goo',
+ ],
+ 'sources': [
+ '../third_party/externals/poppler/fofi/FoFiBase.cc',
+ '../third_party/externals/poppler/fofi/FoFiEncodings.cc',
+ '../third_party/externals/poppler/fofi/FoFiIdentifier.cc',
+ '../third_party/externals/poppler/fofi/FoFiTrueType.cc',
+ '../third_party/externals/poppler/fofi/FoFiType1.cc',
+ '../third_party/externals/poppler/fofi/FoFiType1C.cc',
+ '../third_party/externals/poppler/goo/FixedPoint.cc',
+ '../third_party/externals/poppler/goo/gfile.cc',
+ '../third_party/externals/poppler/goo/gmem.cc',
+ '../third_party/externals/poppler/goo/gmempp.cc',
+ '../third_party/externals/poppler/goo/GooHash.cc',
+ '../third_party/externals/poppler/goo/GooList.cc',
+ '../third_party/externals/poppler/goo/GooString.cc',
+ '../third_party/externals/poppler/goo/GooTimer.cc',
+ '../third_party/externals/poppler/goo/grandom.cc',
+ '../third_party/externals/poppler/goo/gstrtod.cc',
+ '../third_party/externals/poppler/goo/ImgWriter.cc',
+ '../third_party/externals/poppler/goo/JpegWriter.cc',
+ '../third_party/externals/poppler/goo/PNGWriter.cc',
+ '../third_party/externals/poppler/goo/TiffWriter.cc',
+ '../third_party/externals/poppler/poppler/Annot.cc',
+ '../third_party/externals/poppler/poppler/Array.cc',
+ '../third_party/externals/poppler/poppler/BuiltinFont.cc',
+ '../third_party/externals/poppler/poppler/BuiltinFontTables.cc',
+ '../third_party/externals/poppler/poppler/CachedFile.cc',
+ '../third_party/externals/poppler/poppler/Catalog.cc',
+ '../third_party/externals/poppler/poppler/CharCodeToUnicode.cc',
+ '../third_party/externals/poppler/poppler/CMap.cc',
+ '../third_party/externals/poppler/poppler/DateInfo.cc',
+ '../third_party/externals/poppler/poppler/Decrypt.cc',
+ '../third_party/externals/poppler/poppler/Dict.cc',
+ '../third_party/externals/poppler/poppler/Error.cc',
+ '../third_party/externals/poppler/poppler/FileSpec.cc',
+ '../third_party/externals/poppler/poppler/FontEncodingTables.cc',
+ '../third_party/externals/poppler/poppler/FontInfo.cc',
+ '../third_party/externals/poppler/poppler/Form.cc',
+ '../third_party/externals/poppler/poppler/Function.cc',
+ '../third_party/externals/poppler/poppler/Gfx.cc',
+ '../third_party/externals/poppler/poppler/GfxFont.cc',
+ '../third_party/externals/poppler/poppler/GfxState.cc',
+ '../third_party/externals/poppler/poppler/GlobalParams.cc',
+ '../third_party/externals/poppler/poppler/Hints.cc',
+ '../third_party/externals/poppler/poppler/JArithmeticDecoder.cc',
+ '../third_party/externals/poppler/poppler/JBIG2Stream.cc',
+ '../third_party/externals/poppler/poppler/JPXStream.cc',
+ '../third_party/externals/poppler/poppler/Lexer.cc',
+ '../third_party/externals/poppler/poppler/Linearization.cc',
+ '../third_party/externals/poppler/poppler/Link.cc',
+ '../third_party/externals/poppler/poppler/LocalPDFDocBuilder.cc',
+ '../third_party/externals/poppler/poppler/Movie.cc',
+ '../third_party/externals/poppler/poppler/NameToCharCode.cc',
+ '../third_party/externals/poppler/poppler/Object.cc',
+ '../third_party/externals/poppler/poppler/OptionalContent.cc',
+ '../third_party/externals/poppler/poppler/Outline.cc',
+ '../third_party/externals/poppler/poppler/OutputDev.cc',
+ '../third_party/externals/poppler/poppler/Page.cc',
+ '../third_party/externals/poppler/poppler/PageLabelInfo.cc',
+ '../third_party/externals/poppler/poppler/PageTransition.cc',
+ '../third_party/externals/poppler/poppler/Parser.cc',
+ '../third_party/externals/poppler/poppler/PDFDoc.cc',
+ '../third_party/externals/poppler/poppler/PDFDocEncoding.cc',
+ '../third_party/externals/poppler/poppler/PDFDocFactory.cc',
+ '../third_party/externals/poppler/poppler/PopplerCache.cc',
+ '../third_party/externals/poppler/poppler/PreScanOutputDev.cc',
+ '../third_party/externals/poppler/poppler/ProfileData.cc',
+ '../third_party/externals/poppler/poppler/PSOutputDev.cc',
+ '../third_party/externals/poppler/poppler/PSTokenizer.cc',
+ '../third_party/externals/poppler/poppler/Rendition.cc',
+ '../third_party/externals/poppler/poppler/SecurityHandler.cc',
+ '../third_party/externals/poppler/poppler/Sound.cc',
+ '../third_party/externals/poppler/poppler/SplashOutputDev.cc',
+ '../third_party/externals/poppler/poppler/StdinCachedFile.cc',
+ '../third_party/externals/poppler/poppler/StdinPDFDocBuilder.cc',
+ '../third_party/externals/poppler/poppler/Stream.cc',
+ '../third_party/externals/poppler/poppler/strtok_r.cpp',
+ '../third_party/externals/poppler/poppler/TextOutputDev.cc',
+ '../third_party/externals/poppler/poppler/UnicodeMap.cc',
+ '../third_party/externals/poppler/poppler/UnicodeTypeTable.cc',
+ '../third_party/externals/poppler/poppler/UTF.cc',
+ '../third_party/externals/poppler/poppler/ViewerPreferences.cc',
+ '../third_party/externals/poppler/poppler/XpdfPluginAPI.cc',
+ '../third_party/externals/poppler/poppler/XRef.cc',
+ '../third_party/externals/poppler/splash/Splash.cc',
+ '../third_party/externals/poppler/splash/SplashBitmap.cc',
+ '../third_party/externals/poppler/splash/SplashClip.cc',
+ '../third_party/externals/poppler/splash/SplashFont.cc',
+ '../third_party/externals/poppler/splash/SplashFontEngine.cc',
+ '../third_party/externals/poppler/splash/SplashFontFile.cc',
+ '../third_party/externals/poppler/splash/SplashFontFileID.cc',
+ '../third_party/externals/poppler/splash/SplashFTFont.cc',
+ '../third_party/externals/poppler/splash/SplashFTFontEngine.cc',
+ '../third_party/externals/poppler/splash/SplashFTFontFile.cc',
+ '../third_party/externals/poppler/splash/SplashPath.cc',
+ '../third_party/externals/poppler/splash/SplashPattern.cc',
+ '../third_party/externals/poppler/splash/SplashScreen.cc',
+ '../third_party/externals/poppler/splash/SplashState.cc',
+ '../third_party/externals/poppler/splash/SplashT1Font.cc',
+ '../third_party/externals/poppler/splash/SplashT1FontEngine.cc',
+ '../third_party/externals/poppler/splash/SplashT1FontFile.cc',
+ '../third_party/externals/poppler/splash/SplashXPath.cc',
+ '../third_party/externals/poppler/splash/SplashXPathScanner.cc',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../third_party/externals/poppler/poppler',
+ ],
+ },
+ 'conditions': [
+ ['skia_os == "linux"', {
+ 'include_dirs': [
+ '../third_party/poppler/config/linux',
+ '/usr/include/freetype2',
+ ],
+ 'cflags': [
+ '-fPIC',
+ ],
+ }],
+ ['skia_os in ["mac", "win"]', {
+ 'dependencies': [
+ 'freetype.gyp:freetype_poppler',
+ 'fontconfig.gyp:fontconfig',
+ ],
+ }],
+ ['skia_os == "mac"', {
+ 'include_dirs': [
+ '../third_party/poppler/config/mac',
+ ],
+ }],
+ ['skia_os == "win"', {
+ 'include_dirs': [
+ '../third_party/poppler/config/windows',
+ ],
+ }],
+ ],
+ },
+
+ {
+ 'target_name': 'libpoppler-cpp-gpl',
+ 'dependencies': [
+ 'libpoppler-gpl',
+ ],
+ 'type': 'shared_library',
+ 'include_dirs' : [
+ '../third_party/externals/poppler/cpp',
+ '../third_party/externals/poppler',
+ '../third_party/externals/poppler/poppler',
+ '../third_party/externals/poppler/goo',
+
+ '../third_party/poppler/config',
+ ],
+ 'sources': [
+ '../third_party/externals/poppler/cpp/PNMWriter.cc',
+ '../third_party/externals/poppler/cpp/poppler-document.cpp',
+ '../third_party/externals/poppler/cpp/poppler-embedded-file.cpp',
+ '../third_party/externals/poppler/cpp/poppler-font.cpp',
+ '../third_party/externals/poppler/cpp/poppler-global.cpp',
+ '../third_party/externals/poppler/cpp/poppler-image.cpp',
+ '../third_party/externals/poppler/cpp/poppler-page.cpp',
+ '../third_party/externals/poppler/cpp/poppler-page-renderer.cpp',
+ '../third_party/externals/poppler/cpp/poppler-page-transition.cpp',
+ '../third_party/externals/poppler/cpp/poppler-private.cpp',
+ '../third_party/externals/poppler/cpp/poppler-toc.cpp',
+ ],
+ 'defines': [
+ 'poppler_cpp_EXPORTS',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../third_party/externals/poppler/cpp',
+ ],
+ },
+ 'conditions': [
+ ['skia_os == "linux"', {
+ 'include_dirs': [
+ '../third_party/poppler/config/linux',
+ ],
+ 'cflags': [
+ '-fPIC',
+ ],
+ }],
+ ['skia_os == "mac"', {
+ 'include_dirs': [
+ '../third_party/poppler/config/mac',
+ ],
+ 'libraries':[
+ '$(SDKROOT)/usr/lib/libiconv.dylib',
+ '$(SDKROOT)/usr/lib/libexpat.dylib',
+ ],
+ 'xcode_settings': {
+ 'DYLIB_INSTALL_NAME_BASE': '@executable_path',
+ 'OTHER_CPLUSPLUSFLAGS!': [
+ # poppler doesn't do gcc-style exports
+ '-fvisibility=hidden',
+ ],
+ },
+ }],
+ ['skia_os == "win"', {
+ 'dependencies': [
+ 'iconv.gyp:iconv',
+ ],
+ 'include_dirs': [
+ '../third_party/poppler/config/windows',
+ ],
+ }],
+ ],
+ },
+ ],
+}