1 # GYP file to build pdfviewer. 2 # 3 # To build on Linux: 4 # ./gyp_skia pdfviewer.gyp && make pdfviewer 5 # 6 { 7 'includes': [ 8 'apptype_console.gypi', 9 ], 10 'targets': [ 11 { 12 'target_name': 'libpdfviewer', 13 'type': 'static_library', 14 'sources': [ 15 '../experimental/PdfViewer/SkPdfBasics.cpp', 16 '../experimental/PdfViewer/SkPdfFont.cpp', 17 '../experimental/PdfViewer/SkPdfRenderer.cpp', 18 '../experimental/PdfViewer/SkPdfUtils.cpp', 19 #'../experimental/PdfViewer/SkPdfNYI.cpp', 20 '../experimental/PdfViewer/SkTrackDevice.cpp', 21 '../experimental/PdfViewer/SkTracker.cpp', 22 '../experimental/PdfViewer/pdfparser/native/SkPdfObject.cpp', 23 '../experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp', 24 '../experimental/PdfViewer/pdfparser/native/SkNativeParsedPDF.cpp', 25 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', 26 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', 27 ], 28 'copies': [ 29 { 30 'files': [ 31 '../experimental/PdfViewer/datatypes.py', 32 '../experimental/PdfViewer/generate_code.py', 33 ], 34 'destination': '<(SHARED_INTERMEDIATE_DIR)', 35 }, 36 ], 37 'actions': [ 38 { 39 'action_name': 'spec2def', 40 'inputs': [ 41 '../experimental/PdfViewer/spec2def.py', 42 '../experimental/PdfViewer/PdfReference-okular-1.txt', 43 ], 44 'outputs': [ 45 '<(SHARED_INTERMEDIATE_DIR)/pdfspec_autogen.py', 46 ], 47 'action': ['python', '../experimental/PdfViewer/spec2def.py', '../experimental/PdfViewer/PdfReference-okular-1.txt', '<(SHARED_INTERMEDIATE_DIR)/pdfspec_autogen.py'], 48 }, 49 { 50 'action_name': 'generate_code', 51 'inputs': [ 52 '<(SHARED_INTERMEDIATE_DIR)/datatypes.py', 53 '<(SHARED_INTERMEDIATE_DIR)/generate_code.py', 54 '<(SHARED_INTERMEDIATE_DIR)/pdfspec_autogen.py', 55 ], 56 'outputs': [ 57 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfEnums_autogen.h', 58 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfMapper_autogen.h', 59 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfHeaders_autogen.h', 60 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', 61 '<(SHARED_INTERMEDIATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', 62 # TODO(edisonn): ok, there are many more files here, which we should list but since 63 # any change in the above should trigger a change here, we should be fine normally 64 ], 65 'action': ['python', '<(SHARED_INTERMEDIATE_DIR)/generate_code.py', '<(SHARED_INTERMEDIATE_DIR)'], 66 }, 67 ], 68 'include_dirs': [ 69 '../experimental/PdfViewer', 70 '../experimental/PdfViewer/pdfparser', 71 '../experimental/PdfViewer/pdfparser/native', 72 '<(SHARED_INTERMEDIATE_DIR)/native/autogen', 73 ], 74 'dependencies': [ 75 'skia_lib.gyp:skia_lib', 76 'zlib.gyp:zlib', 77 ], 78 }, 79 { 80 'target_name': 'pdfviewer', 81 'type': 'executable', 82 'cflags': ['-fexceptions'], 83 'cflags_cc': ['-fexceptions'], 84 'cflags!': [ '-fno-exceptions' ], 85 'cflags_cc!': [ '-fno-exceptions' ], 86 'sources': [ 87 '../experimental/PdfViewer/pdf_viewer_main.cpp', 88 ], 89 'include_dirs': [ 90 '../experimental/PdfViewer', 91 '../experimental/PdfViewer/pdfparser', 92 '../experimental/PdfViewer/pdfparser/autogen', 93 '../experimental/PdfViewer/pdfparser/native', 94 '../experimental/PdfViewer/pdfparser/native/autogen', 95 ], 96 'dependencies': [ 97 'skia_lib.gyp:skia_lib', 98 'flags.gyp:flags', 99 'libpdfviewer', 100 'chop_transparency', 101 ], 102 }, 103 { 104 'target_name': 'chop_transparency', 105 'type': 'executable', 106 'sources': [ 107 '../experimental/PdfViewer/chop_transparency_main.cpp', 108 ], 109 'include_dirs': [ 110 # For SkBitmapHasher.h 111 '../src/utils/', 112 ], 113 'dependencies': [ 114 'skia_lib.gyp:skia_lib', 115 'flags.gyp:flags', 116 ], 117 }, 118 ], 119 } 120 121 # Local Variables: 122 # tab-width:2 123 # indent-tabs-mode:nil 124 # End: 125 # vim: set expandtab tabstop=2 shiftwidth=2: 126