| OLD | NEW |
| 1 # GYP file to build pdfviewer. | 1 # GYP file to build pdfviewer. |
| 2 # | 2 # |
| 3 # To build on Linux: | 3 # To build on Linux: |
| 4 # ./gyp_skia pdfviewer.gyp && make pdfviewer | 4 # ./gyp_skia pdfviewer.gyp && make pdfviewer |
| 5 # | 5 # |
| 6 { | 6 { |
| 7 'includes': [ | 7 'includes': [ |
| 8 'apptype_console.gypi', | 8 'apptype_console.gypi', |
| 9 ], | 9 ], |
| 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 ], | |
| 25 'targets': [ | 10 'targets': [ |
| 26 { | 11 { |
| 27 'target_name': 'libpdfviewer', | |
| 28 'type': 'static_library', | |
| 29 'sources': [ | |
| 30 '../experimental/PdfViewer/SkPdfGraphicsState.cpp', | |
| 31 '../experimental/PdfViewer/SkPdfFont.cpp', | |
| 32 '../experimental/PdfViewer/SkPdfRenderer.cpp', | |
| 33 '../experimental/PdfViewer/SkPdfUtils.cpp', | |
| 34 #'../experimental/PdfViewer/SkPdfNYI.cpp', | |
| 35 '../experimental/PdfViewer/SkTrackDevice.cpp', | |
| 36 '../experimental/PdfViewer/SkTracker.cpp', | |
| 37 '../experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp', | |
| 38 '../experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp', | |
| 39 '../experimental/PdfViewer/pdfparser/native/SkPdfNativeDoc.cpp', | |
| 40 '<(GENERATE_DIR)/native/autogen/SkPdfMapper_autogen.cpp', | |
| 41 '<(GENERATE_DIR)/native/autogen/SkPdfHeaders_autogen.cpp', | |
| 42 ], | |
| 43 'actions': [ | |
| 44 { | |
| 45 'action_name': 'spec2def', | |
| 46 'inputs': [ | |
| 47 '../experimental/PdfViewer/spec2def.py', | |
| 48 '../experimental/PdfViewer/PdfReference-okular-1.txt', | |
| 49 ], | |
| 50 'outputs': [ | |
| 51 '<(GENERATE_DIR)/pdfspec_autogen.py', | |
| 52 ], | |
| 53 'action': ['python', '../experimental/PdfViewer/spec2def.py', '../expe
rimental/PdfViewer/PdfReference-okular-1.txt', '<(GENERATE_DIR)/pdfspec_autogen.
py'], | |
| 54 }, | |
| 55 { | |
| 56 'action_name': 'copy_files1', | |
| 57 'inputs' : ['../experimental/PdfViewer/datatypes.py'], | |
| 58 'outputs': [ | |
| 59 '<(GENERATE_DIR)/datatypes.py', | |
| 60 ], | |
| 61 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GEN
ERATE_DIR)', '../experimental/PdfViewer/datatypes.py'], | |
| 62 }, | |
| 63 { | |
| 64 'action_name': 'copy_files2', | |
| 65 | |
| 66 'inputs' : ['../experimental/PdfViewer/generate_code.py'], | |
| 67 'outputs': [ | |
| 68 '<(GENERATE_DIR)/generate_code.py', | |
| 69 ], | |
| 70 'action': ['python', '../experimental/PdfViewer/copy_files.py', '<(GEN
ERATE_DIR)', '../experimental/PdfViewer/generate_code.py'], | |
| 71 }, | |
| 72 { | |
| 73 'action_name': 'generate_code', | |
| 74 'inputs': [ | |
| 75 '<(GENERATE_DIR)/datatypes.py', | |
| 76 '<(GENERATE_DIR)/generate_code.py', | |
| 77 '<(GENERATE_DIR)/pdfspec_autogen.py', | |
| 78 ], | |
| 79 'outputs': [ | |
| 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', | |
| 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 ], | |
| 88 'action': ['python', '<(GENERATE_DIR)/generate_code.py', '<(GENERATE_D
IR)'], | |
| 89 }, | |
| 90 ], | |
| 91 'include_dirs': [ | |
| 92 '../experimental/PdfViewer', | |
| 93 '../experimental/PdfViewer/pdfparser', | |
| 94 '../experimental/PdfViewer/pdfparser/native', | |
| 95 '<(GENERATE_DIR)/native/autogen', | |
| 96 ], | |
| 97 'dependencies': [ | |
| 98 'skia_lib.gyp:skia_lib', | |
| 99 'zlib.gyp:zlib', | |
| 100 ], | |
| 101 }, | |
| 102 { | |
| 103 'target_name': 'pdfviewer', | 12 'target_name': 'pdfviewer', |
| 104 'type': 'executable', | 13 'type': 'executable', |
| 105 'cflags': ['-fexceptions'], | |
| 106 'cflags_cc': ['-fexceptions'], | |
| 107 'cflags!': [ '-fno-exceptions' ], | |
| 108 'cflags_cc!': [ '-fno-exceptions' ], | |
| 109 'sources': [ | 14 'sources': [ |
| 110 '../experimental/PdfViewer/pdf_viewer_main.cpp', | 15 '../experimental/PdfViewer/pdf_viewer_main.cpp', |
| 111 ], | 16 ], |
| 112 'include_dirs': [ | 17 'include_dirs': [ |
| 113 '../experimental/PdfViewer', | 18 '../experimental/PdfViewer', |
| 114 '../experimental/PdfViewer/pdfparser', | 19 '../experimental/PdfViewer/pdfparser', |
| 115 '../experimental/PdfViewer/pdfparser/autogen', | |
| 116 '../experimental/PdfViewer/pdfparser/native', | 20 '../experimental/PdfViewer/pdfparser/native', |
| 117 '../experimental/PdfViewer/pdfparser/native/autogen', | |
| 118 ], | 21 ], |
| 119 'dependencies': [ | 22 'dependencies': [ |
| 23 'chop_transparency', |
| 24 'flags.gyp:flags', |
| 25 'pdfviewer_lib.gyp:pdfviewer_lib', |
| 120 'skia_lib.gyp:skia_lib', | 26 'skia_lib.gyp:skia_lib', |
| 121 'flags.gyp:flags', | |
| 122 'libpdfviewer', | |
| 123 'chop_transparency', | |
| 124 ], | 27 ], |
| 125 }, | 28 }, |
| 126 { | 29 { |
| 127 'target_name': 'chop_transparency', | 30 'target_name': 'chop_transparency', |
| 128 'type': 'executable', | 31 'type': 'executable', |
| 129 'sources': [ | 32 'sources': [ |
| 130 '../experimental/PdfViewer/chop_transparency_main.cpp', | 33 '../experimental/PdfViewer/chop_transparency_main.cpp', |
| 131 ], | 34 ], |
| 132 'include_dirs': [ | 35 'include_dirs': [ |
| 133 # For SkBitmapHasher.h | 36 # For SkBitmapHasher.h |
| 134 '../src/utils/', | 37 '../src/utils/', |
| 135 ], | 38 ], |
| 136 'dependencies': [ | 39 'dependencies': [ |
| 40 'flags.gyp:flags', |
| 137 'skia_lib.gyp:skia_lib', | 41 'skia_lib.gyp:skia_lib', |
| 138 'flags.gyp:flags', | |
| 139 ], | 42 ], |
| 140 }, | 43 }, |
| 141 ], | 44 ], |
| 142 } | 45 } |
| 143 | 46 |
| 144 # Local Variables: | 47 # Local Variables: |
| 145 # tab-width:2 | 48 # tab-width:2 |
| 146 # indent-tabs-mode:nil | 49 # indent-tabs-mode:nil |
| 147 # End: | 50 # End: |
| 148 # vim: set expandtab tabstop=2 shiftwidth=2: | 51 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |