| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 1 | # GYP file to build pdfviewer. |
| 2 | # |
| 3 | # To build on Linux: |
| 4 | # ./gyp_skia pdfviewer.gyp && make pdfviewer |
| 5 | # |
| 6 | { |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 7 | 'includes': [ |
| 8 | 'apptype_console.gypi', |
| 9 | ], |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 10 | # TODO(edisonn): Hack! on mack, SHARED_INTERMEDIATE_DIR can't be reliable used in a sources context |
| 11 | 'conditions' : [ |
| 12 | [ 'skia_os != "mac"', { |
| 13 | 'variables': { |
| 14 | 'GENERATE_DIR%' : '<(SHARED_INTERMEDIATE_DIR)', |
| 15 | }, |
| 16 | }, |
| 17 | ], |
| 18 | [ 'skia_os == "mac"', { |
| 19 | 'variables': { |
| 20 | 'GENERATE_DIR%' : '../src/tmp_autogen', |
| 21 | }, |
| 22 | }, |
| 23 | ], |
| 24 | ], |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 25 | 'targets': [ |
| 26 | { |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 27 | 'target_name': 'libpdfviewer', |
| 28 | 'type': 'static_library', |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 29 | 'sources': [ |
| edisonn@google.com | 3aa3555 | 2013-08-14 18:26:20 +0000 | [diff] [blame] | 30 | '../experimental/PdfViewer/SkPdfGraphicsState.cpp', |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 31 | '../experimental/PdfViewer/SkPdfFont.cpp', |
| edisonn@google.com | 222382b | 2013-07-10 22:33:10 +0000 | [diff] [blame] | 32 | '../experimental/PdfViewer/SkPdfRenderer.cpp', |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 33 | '../experimental/PdfViewer/SkPdfUtils.cpp', |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 34 | #'../experimental/PdfViewer/SkPdfNYI.cpp', |
| edisonn@google.com | ac03d91 | 2013-07-22 15:36:39 +0000 | [diff] [blame] | 35 | '../experimental/PdfViewer/SkTrackDevice.cpp', |
| 36 | '../experimental/PdfViewer/SkTracker.cpp', |
| edisonn@google.com | 3aa3555 | 2013-08-14 18:26:20 +0000 | [diff] [blame] | 37 | '../experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp', |
| edisonn@google.com | 571c70b | 2013-07-10 17:09:50 +0000 | [diff] [blame] | 38 | '../experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp', |
| edisonn@google.com | 3aa3555 | 2013-08-14 18:26:20 +0000 | [diff] [blame] | 39 | '../experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp', |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 40 | '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', |
| 41 | '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', |
| skia.committer@gmail.com | 956b310 | 2013-07-26 07:00:58 +0000 | [diff] [blame] | 42 | ], |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 43 | 'actions': [ |
| 44 | { |
| 45 | 'action_name': 'spec2def', |
| 46 | 'inputs': [ |
| 47 | '../experimental/PdfViewer/spec2def.py', |
| 48 | '../experimental/PdfViewer/PdfReference-okular-1.txt', |
| 49 | ], |
| 50 | 'outputs': [ |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 51 | '<(GENERATE_DIR)/pdfspec_autogen.py', |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 52 | ], |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 53 | 'action': ['python', '../experimental/PdfViewer/spec2def.py', '../experimental/PdfViewer/PdfReference-okular-1.txt', '<(GENERATE_DIR)/pdfspec_autogen.py'], |
| 54 | }, |
| 55 | { |
| edisonn@google.com | fb7b1bf | 2013-08-14 22:05:06 +0000 | [diff] [blame] | 56 | 'action_name': 'copy_files1', |
| 57 | 'inputs' : ['../experimental/PdfViewer/datatypes.py'], |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 58 | 'outputs': [ |
| 59 | '<(GENERATE_DIR)/datatypes.py', |
| edisonn@google.com | fb7b1bf | 2013-08-14 22:05:06 +0000 | [diff] [blame] | 60 | ], |
| 61 | 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GENERATE_DIR)', '../experimental/PdfViewer/datatypes.py'], |
| 62 | }, |
| 63 | { |
| 64 | 'action_name': 'copy_files2', |
| 65 | |
| 66 | 'inputs' : ['../experimental/PdfViewer/generate_code.py'], |
| 67 | 'outputs': [ |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 68 | '<(GENERATE_DIR)/generate_code.py', |
| 69 | ], |
| edisonn@google.com | fb7b1bf | 2013-08-14 22:05:06 +0000 | [diff] [blame] | 70 | 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GENERATE_DIR)', '../experimental/PdfViewer/generate_code.py'], |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 71 | }, |
| 72 | { |
| 73 | 'action_name': 'generate_code', |
| 74 | 'inputs': [ |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 75 | '<(GENERATE_DIR)/datatypes.py', |
| 76 | '<(GENERATE_DIR)/generate_code.py', |
| 77 | '<(GENERATE_DIR)/pdfspec_autogen.py', |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 78 | ], |
| 79 | 'outputs': [ |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 80 | '<(GENERATE_DIR)/native/autogen/SkPdfEnums_autogen.h', |
| 81 | '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.h', |
| 82 | '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.h', |
| 83 | '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', |
| 84 | '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 85 | # TODO(edisonn): ok, there are many more files here, which we should list but since |
| 86 | # any change in the above should trigger a change here, we should be fine normally |
| 87 | ], |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 88 | 'action': ['python', '<(GENERATE_DIR)/generate_code.py', '<(GENERATE_DIR)'], |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 89 | }, |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 90 | ], |
| 91 | 'include_dirs': [ |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 92 | '../experimental/PdfViewer', |
| edisonn@google.com | 5d41b36 | 2013-06-28 22:01:06 +0000 | [diff] [blame] | 93 | '../experimental/PdfViewer/pdfparser', |
| edisonn@google.com | 571c70b | 2013-07-10 17:09:50 +0000 | [diff] [blame] | 94 | '../experimental/PdfViewer/pdfparser/native', |
| edisonn@google.com | 33f11b6 | 2013-08-14 21:35:27 +0000 | [diff] [blame] | 95 | '<(GENERATE_DIR)/native/autogen', |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 96 | ], |
| 97 | 'dependencies': [ |
| edisonn@google.com | 768bc6a | 2013-08-08 12:42:13 +0000 | [diff] [blame] | 98 | 'skia_lib.gyp:skia_lib', |
| edisonn@google.com | a5aaa79 | 2013-07-11 12:27:21 +0000 | [diff] [blame] | 99 | 'zlib.gyp:zlib', |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 100 | ], |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 101 | }, |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 102 | { |
| 103 | 'target_name': 'pdfviewer', |
| 104 | 'type': 'executable', |
| 105 | 'cflags': ['-fexceptions'], |
| 106 | 'cflags_cc': ['-fexceptions'], |
| 107 | 'cflags!': [ '-fno-exceptions' ], |
| 108 | 'cflags_cc!': [ '-fno-exceptions' ], |
| 109 | 'sources': [ |
| 110 | '../experimental/PdfViewer/pdf_viewer_main.cpp', |
| 111 | ], |
| 112 | 'include_dirs': [ |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 113 | '../experimental/PdfViewer', |
| edisonn@google.com | 3aac1f9 | 2013-07-02 22:42:53 +0000 | [diff] [blame] | 114 | '../experimental/PdfViewer/pdfparser', |
| 115 | '../experimental/PdfViewer/pdfparser/autogen', |
| edisonn@google.com | 571c70b | 2013-07-10 17:09:50 +0000 | [diff] [blame] | 116 | '../experimental/PdfViewer/pdfparser/native', |
| 117 | '../experimental/PdfViewer/pdfparser/native/autogen', |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 118 | ], |
| 119 | 'dependencies': [ |
| edisonn@google.com | 768bc6a | 2013-08-08 12:42:13 +0000 | [diff] [blame] | 120 | 'skia_lib.gyp:skia_lib', |
| edisonn@google.com | a5aaa79 | 2013-07-11 12:27:21 +0000 | [diff] [blame] | 121 | 'flags.gyp:flags', |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 122 | 'libpdfviewer', |
| edisonn@google.com | 5149bd9 | 2013-08-05 17:26:11 +0000 | [diff] [blame] | 123 | 'chop_transparency', |
| 124 | ], |
| 125 | }, |
| 126 | { |
| 127 | 'target_name': 'chop_transparency', |
| 128 | 'type': 'executable', |
| 129 | 'sources': [ |
| 130 | '../experimental/PdfViewer/chop_transparency_main.cpp', |
| 131 | ], |
| 132 | 'include_dirs': [ |
| 133 | # For SkBitmapHasher.h |
| 134 | '../src/utils/', |
| 135 | ], |
| 136 | 'dependencies': [ |
| 137 | 'skia_lib.gyp:skia_lib', |
| 138 | 'flags.gyp:flags', |
| edisonn@google.com | 131d4ee | 2013-06-26 17:48:12 +0000 | [diff] [blame] | 139 | ], |
| 140 | }, |
| skia.committer@gmail.com | 7fb5373 | 2013-06-11 07:01:17 +0000 | [diff] [blame] | 141 | ], |
| edisonn@google.com | 01cd4d5 | 2013-06-10 20:44:45 +0000 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | # Local Variables: |
| 145 | # tab-width:2 |
| 146 | # indent-tabs-mode:nil |
| 147 | # End: |
| 148 | # vim: set expandtab tabstop=2 shiftwidth=2: |