1# Copyright 2018 The PDFium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("../../pdfium.gni") 6import("../../testing/test.gni") 7 8source_set("fxcrt") { 9 sources = [ 10 "autorestorer.h", 11 "byteorder.h", 12 "bytestring.cpp", 13 "bytestring.h", 14 "cfx_binarybuf.cpp", 15 "cfx_binarybuf.h", 16 "cfx_bitstream.cpp", 17 "cfx_bitstream.h", 18 "cfx_datetime.cpp", 19 "cfx_datetime.h", 20 "cfx_fixedbufgrow.h", 21 "cfx_readonlymemorystream.cpp", 22 "cfx_readonlymemorystream.h", 23 "cfx_seekablestreamproxy.cpp", 24 "cfx_seekablestreamproxy.h", 25 "cfx_timer.cpp", 26 "cfx_timer.h", 27 "cfx_utf8decoder.cpp", 28 "cfx_utf8decoder.h", 29 "cfx_utf8encoder.cpp", 30 "cfx_utf8encoder.h", 31 "cfx_widetextbuf.cpp", 32 "cfx_widetextbuf.h", 33 "fileaccess_iface.h", 34 "fx_bidi.cpp", 35 "fx_bidi.h", 36 "fx_codepage.cpp", 37 "fx_codepage.h", 38 "fx_coordinates.cpp", 39 "fx_coordinates.h", 40 "fx_extension.cpp", 41 "fx_extension.h", 42 "fx_memory.cpp", 43 "fx_memory.h", 44 "fx_memory_wrappers.h", 45 "fx_number.cpp", 46 "fx_number.h", 47 "fx_random.cpp", 48 "fx_random.h", 49 "fx_safe_types.h", 50 "fx_stream.cpp", 51 "fx_stream.h", 52 "fx_string.cpp", 53 "fx_string.h", 54 "fx_system.cpp", 55 "fx_system.h", 56 "fx_unicode.cpp", 57 "fx_unicode.h", 58 "maybe_owned.h", 59 "observed_ptr.cpp", 60 "observed_ptr.h", 61 "pauseindicator_iface.h", 62 "retain_ptr.h", 63 "retained_tree_node.h", 64 "shared_copy_on_write.h", 65 "string_data_template.h", 66 "string_pool_template.h", 67 "string_view_template.h", 68 "timerhandler_iface.h", 69 "tree_node.h", 70 "unowned_ptr.h", 71 "weak_ptr.h", 72 "widestring.cpp", 73 "widestring.h", 74 "xml/cfx_xmlchardata.cpp", 75 "xml/cfx_xmlchardata.h", 76 "xml/cfx_xmldocument.cpp", 77 "xml/cfx_xmldocument.h", 78 "xml/cfx_xmlelement.cpp", 79 "xml/cfx_xmlelement.h", 80 "xml/cfx_xmlinstruction.cpp", 81 "xml/cfx_xmlinstruction.h", 82 "xml/cfx_xmlnode.cpp", 83 "xml/cfx_xmlnode.h", 84 "xml/cfx_xmlparser.cpp", 85 "xml/cfx_xmlparser.h", 86 "xml/cfx_xmltext.cpp", 87 "xml/cfx_xmltext.h", 88 ] 89 configs += [ "../../:pdfium_core_config" ] 90 visibility = [ 91 "../*", 92 "../../:*", 93 "../../fpdfsdk/*", 94 "../../fxbarcode:*", 95 "../../fxjs:*", 96 "../../testing:*", 97 "../../testing/fuzzers/*", 98 "../../third_party:fx_agg", 99 "../../third_party:fx_lcms2", 100 "../../third_party:fx_tiff", 101 "../../third_party:pdfium_base", 102 "../../xfa/*", 103 ] 104 deps = [ "../../third_party:pdfium_base" ] 105 public_deps = [ 106 "../../:freetype_common", 107 "../../third_party:pdfium_base", 108 "//third_party/icu:icuuc", 109 ] 110 allow_circular_includes_from = [ "../../third_party:pdfium_base" ] 111 112 if (is_posix || is_fuchsia) { 113 sources += [ 114 "cfx_fileaccess_posix.cpp", 115 "cfx_fileaccess_posix.h", 116 ] 117 } 118 if (is_win) { 119 sources += [ 120 "cfx_fileaccess_windows.cpp", 121 "cfx_fileaccess_windows.h", 122 ] 123 } 124 if (pdf_enable_xfa) { 125 sources += [ 126 "cfx_memorystream.cpp", 127 "cfx_memorystream.h", 128 ] 129 } 130} 131 132pdfium_unittest_source_set("unittests") { 133 sources = [ 134 "autorestorer_unittest.cpp", 135 "byteorder_unittest.cpp", 136 "bytestring_unittest.cpp", 137 "cfx_bitstream_unittest.cpp", 138 "cfx_seekablestreamproxy_unittest.cpp", 139 "cfx_timer_unittest.cpp", 140 "cfx_widetextbuf_unittest.cpp", 141 "fx_bidi_unittest.cpp", 142 "fx_coordinates_unittest.cpp", 143 "fx_extension_unittest.cpp", 144 "fx_memory_unittest.cpp", 145 "fx_memory_wrappers_unittest.cpp", 146 "fx_number_unittest.cpp", 147 "fx_random_unittest.cpp", 148 "fx_string_unittest.cpp", 149 "fx_system_unittest.cpp", 150 "maybe_owned_unittest.cpp", 151 "observed_ptr_unittest.cpp", 152 "pdfium_span_unittest.cpp", 153 "retain_ptr_unittest.cpp", 154 "retained_tree_node_unittest.cpp", 155 "shared_copy_on_write_unittest.cpp", 156 "string_pool_template_unittest.cpp", 157 "tree_node_unittest.cpp", 158 "unowned_ptr_unittest.cpp", 159 "weak_ptr_unittest.cpp", 160 "widestring_unittest.cpp", 161 "xml/cfx_xmlchardata_unittest.cpp", 162 "xml/cfx_xmldocument_unittest.cpp", 163 "xml/cfx_xmlelement_unittest.cpp", 164 "xml/cfx_xmlinstruction_unittest.cpp", 165 "xml/cfx_xmlnode_unittest.cpp", 166 "xml/cfx_xmlparser_unittest.cpp", 167 "xml/cfx_xmltext_unittest.cpp", 168 ] 169 deps = [] 170 pdfium_root_dir = "../../" 171 172 if (pdf_enable_xfa) { 173 sources += [ 174 "cfx_memorystream_unittest.cpp", 175 "css/cfx_cssdeclaration_unittest.cpp", 176 "css/cfx_cssstylesheet_unittest.cpp", 177 "css/cfx_cssvaluelistparser_unittest.cpp", 178 ] 179 deps += [ 180 "../fpdfapi/parser", 181 "css", 182 ] 183 } 184} 185