Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Side by Side Diff: third_party/BUILD.gn

Issue 2164633005: Convert source sets to static libraries. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: base Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 PDFium Authors. All rights reserved. 1 # Copyright 2014 PDFium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("../pdfium.gni") 5 import("../pdfium.gni")
6 6
7 group("third_party") { 7 group("third_party") {
8 deps = [ 8 deps = [
9 ":bigint", 9 ":bigint",
10 ":fx_freetype", 10 ":fx_freetype",
11 ":pdfium_base", 11 ":pdfium_base",
12 ] 12 ]
13 } 13 }
14 14
15 config("pdfium_third_party_config") { 15 config("pdfium_third_party_config") {
16 configs = [ "..:pdfium_common_config" ] 16 configs = [ "..:pdfium_common_config" ]
17 } 17 }
18 18
19 source_set("bigint") { 19 static_library("bigint") {
20 configs -= [ "//build/config/compiler:chromium_code" ] 20 configs -= [ "//build/config/compiler:chromium_code" ]
21 configs += [ 21 configs += [
22 "//build/config/compiler:no_chromium_code", 22 "//build/config/compiler:no_chromium_code",
23 ":pdfium_third_party_config", 23 ":pdfium_third_party_config",
24 ] 24 ]
25 sources = [ 25 sources = [
26 "bigint/BigInteger.cc", 26 "bigint/BigInteger.cc",
27 "bigint/BigInteger.hh", 27 "bigint/BigInteger.hh",
28 "bigint/BigIntegerLibrary.hh", 28 "bigint/BigIntegerLibrary.hh",
29 "bigint/BigIntegerUtils.cc", 29 "bigint/BigIntegerUtils.cc",
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 if (!pdf_use_skia) { 100 if (!pdf_use_skia) {
101 config("fx_agg_warnings") { 101 config("fx_agg_warnings") {
102 visibility = [ ":*" ] 102 visibility = [ ":*" ]
103 if (is_clang) { 103 if (is_clang) {
104 # calc_butt_cap() in agg_vcgen_stroke.cpp is unused. 104 # calc_butt_cap() in agg_vcgen_stroke.cpp is unused.
105 cflags = [ "-Wno-unused-function" ] 105 cflags = [ "-Wno-unused-function" ]
106 } 106 }
107 } 107 }
108 108
109 source_set("fx_agg") { 109 static_library("fx_agg") {
110 configs -= [ "//build/config/compiler:chromium_code" ] 110 configs -= [ "//build/config/compiler:chromium_code" ]
111 configs += [ 111 configs += [
112 "//build/config/compiler:no_chromium_code", 112 "//build/config/compiler:no_chromium_code",
113 ":pdfium_third_party_config", 113 ":pdfium_third_party_config",
114 114
115 # Must be after no_chromium_code for warning flags to be ordered correctly . 115 # Must be after no_chromium_code for warning flags to be ordered correctly .
116 ":fx_agg_warnings", 116 ":fx_agg_warnings",
117 ] 117 ]
118 sources = [ 118 sources = [
119 "agg23/agg_basics.h", 119 "agg23/agg_basics.h",
(...skipping 22 matching lines...) Expand all
142 # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this 142 # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
143 # library doesn't appear to have this problem. 143 # library doesn't appear to have this problem.
144 "-Wno-missing-braces", 144 "-Wno-missing-braces",
145 145
146 # FindPrev() in cmsplugin.c is unused. 146 # FindPrev() in cmsplugin.c is unused.
147 "-Wno-unused-function", 147 "-Wno-unused-function",
148 ] 148 ]
149 } 149 }
150 } 150 }
151 151
152 source_set("fx_lcms2") { 152 static_library("fx_lcms2") {
153 configs -= [ "//build/config/compiler:chromium_code" ] 153 configs -= [ "//build/config/compiler:chromium_code" ]
154 configs += [ 154 configs += [
155 "//build/config/compiler:no_chromium_code", 155 "//build/config/compiler:no_chromium_code",
156 ":pdfium_third_party_config", 156 ":pdfium_third_party_config",
157 157
158 # Must be after no_chromium_code for warning flags to be ordered correctly. 158 # Must be after no_chromium_code for warning flags to be ordered correctly.
159 ":fx_lcms2_warnings", 159 ":fx_lcms2_warnings",
160 ] 160 ]
161 sources = [ 161 sources = [
162 "lcms2-2.6/include/lcms2.h", 162 "lcms2-2.6/include/lcms2.h",
(...skipping 27 matching lines...) Expand all
190 } 190 }
191 191
192 # This is only used for standalone builds. 192 # This is only used for standalone builds.
193 config("jpeg_warnings") { 193 config("jpeg_warnings") {
194 visibility = [ ":*" ] 194 visibility = [ ":*" ]
195 if (is_clang) { 195 if (is_clang) {
196 cflags = [ "-Wno-shift-negative-value" ] 196 cflags = [ "-Wno-shift-negative-value" ]
197 } 197 }
198 } 198 }
199 199
200 source_set("jpeg") { 200 static_library("jpeg") {
201 configs -= [ "//build/config/compiler:chromium_code" ] 201 configs -= [ "//build/config/compiler:chromium_code" ]
202 configs += [ 202 configs += [
203 "//build/config/compiler:no_chromium_code", 203 "//build/config/compiler:no_chromium_code",
204 ":pdfium_third_party_config", 204 ":pdfium_third_party_config",
205 205
206 # Must be after no_chromium_code for warning flags to be ordered correctly. 206 # Must be after no_chromium_code for warning flags to be ordered correctly.
207 ":jpeg_warnings", 207 ":jpeg_warnings",
208 ] 208 ]
209 sources = [ 209 sources = [
210 "libjpeg/cderror.h", 210 "libjpeg/cderror.h",
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 config("fx_libopenjpeg_warnings") { 268 config("fx_libopenjpeg_warnings") {
269 visibility = [ ":*" ] 269 visibility = [ ":*" ]
270 if (is_win) { 270 if (is_win) {
271 cflags = [ 271 cflags = [
272 # Signed/unsigned comparisons. 272 # Signed/unsigned comparisons.
273 "/wd4018", 273 "/wd4018",
274 ] 274 ]
275 } 275 }
276 } 276 }
277 277
278 source_set("fx_libopenjpeg") { 278 static_library("fx_libopenjpeg") {
279 configs -= [ "//build/config/compiler:chromium_code" ] 279 configs -= [ "//build/config/compiler:chromium_code" ]
280 configs += [ 280 configs += [
281 "//build/config/compiler:no_chromium_code", 281 "//build/config/compiler:no_chromium_code",
282 ":pdfium_third_party_config", 282 ":pdfium_third_party_config",
283 283
284 # Must be after no_chromium_code for warning flags to be ordered correctly. 284 # Must be after no_chromium_code for warning flags to be ordered correctly.
285 ":fx_libopenjpeg_warnings", 285 ":fx_libopenjpeg_warnings",
286 ] 286 ]
287 sources = [ 287 sources = [
288 "libopenjpeg20/bio.c", 288 "libopenjpeg20/bio.c",
(...skipping 11 matching lines...) Expand all
300 "libopenjpeg20/opj_clock.c", 300 "libopenjpeg20/opj_clock.c",
301 "libopenjpeg20/pi.c", 301 "libopenjpeg20/pi.c",
302 "libopenjpeg20/raw.c", 302 "libopenjpeg20/raw.c",
303 "libopenjpeg20/t1.c", 303 "libopenjpeg20/t1.c",
304 "libopenjpeg20/t2.c", 304 "libopenjpeg20/t2.c",
305 "libopenjpeg20/tcd.c", 305 "libopenjpeg20/tcd.c",
306 "libopenjpeg20/tgt.c", 306 "libopenjpeg20/tgt.c",
307 ] 307 ]
308 } 308 }
309 309
310 source_set("fx_lpng") { 310 static_library("fx_lpng") {
311 configs -= [ "//build/config/compiler:chromium_code" ] 311 configs -= [ "//build/config/compiler:chromium_code" ]
312 configs += [ 312 configs += [
313 "//build/config/compiler:no_chromium_code", 313 "//build/config/compiler:no_chromium_code",
314 ":pdfium_third_party_config", 314 ":pdfium_third_party_config",
315 ] 315 ]
316 sources = [ 316 sources = [
317 "libpng16/png.c", 317 "libpng16/png.c",
318 "libpng16/png.h", 318 "libpng16/png.h",
319 "libpng16/pngconf.h", 319 "libpng16/pngconf.h",
320 "libpng16/pngdebug.h", 320 "libpng16/pngdebug.h",
(...skipping 13 matching lines...) Expand all
334 "libpng16/pngstruct.h", 334 "libpng16/pngstruct.h",
335 "libpng16/pngtrans.c", 335 "libpng16/pngtrans.c",
336 "libpng16/pngwio.c", 336 "libpng16/pngwio.c",
337 "libpng16/pngwrite.c", 337 "libpng16/pngwrite.c",
338 "libpng16/pngwtran.c", 338 "libpng16/pngwtran.c",
339 "libpng16/pngwutil.c", 339 "libpng16/pngwutil.c",
340 ] 340 ]
341 } 341 }
342 342
343 if (pdf_enable_xfa) { 343 if (pdf_enable_xfa) {
344 source_set("fx_tiff") { 344 static_library("fx_tiff") {
345 configs -= [ "//build/config/compiler:chromium_code" ] 345 configs -= [ "//build/config/compiler:chromium_code" ]
346 configs += [ 346 configs += [
347 "//build/config/compiler:no_chromium_code", 347 "//build/config/compiler:no_chromium_code",
348 ":pdfium_third_party_config", 348 ":pdfium_third_party_config",
349 ] 349 ]
350 if (is_win) { 350 if (is_win) {
351 # Need to undefine the macro since it is redefined in 351 # Need to undefine the macro since it is redefined in
352 # tif_ojpeg.c and tif_jpeg.c. 352 # tif_ojpeg.c and tif_jpeg.c.
353 configs -= [ "//build/config/win:lean_and_mean" ] 353 configs -= [ "//build/config/win:lean_and_mean" ]
354 } 354 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712 400 # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712
401 config("fx_zlib_warnings") { 401 config("fx_zlib_warnings") {
402 visibility = [ ":*" ] 402 visibility = [ ":*" ]
403 if (is_clang) { 403 if (is_clang) {
404 cflags = [ "-Wno-shift-negative-value" ] 404 cflags = [ "-Wno-shift-negative-value" ]
405 } 405 }
406 } 406 }
407 407
408 source_set("fx_zlib") { 408 static_library("fx_zlib") {
409 configs -= [ "//build/config/compiler:chromium_code" ] 409 configs -= [ "//build/config/compiler:chromium_code" ]
410 configs += [ 410 configs += [
411 "//build/config/compiler:no_chromium_code", 411 "//build/config/compiler:no_chromium_code",
412 ":pdfium_third_party_config", 412 ":pdfium_third_party_config",
413 413
414 # Must be after no_chromium_code for warning flags to be ordered correctly. 414 # Must be after no_chromium_code for warning flags to be ordered correctly.
415 ":fx_zlib_warnings", 415 ":fx_zlib_warnings",
416 ] 416 ]
417 sources = [ 417 sources = [
418 "zlib_v128/adler32.c", 418 "zlib_v128/adler32.c",
419 "zlib_v128/compress.c", 419 "zlib_v128/compress.c",
420 "zlib_v128/crc32.c", 420 "zlib_v128/crc32.c",
421 "zlib_v128/deflate.c", 421 "zlib_v128/deflate.c",
422 "zlib_v128/gzclose.c", 422 "zlib_v128/gzclose.c",
423 "zlib_v128/gzlib.c", 423 "zlib_v128/gzlib.c",
424 "zlib_v128/gzread.c", 424 "zlib_v128/gzread.c",
425 "zlib_v128/gzwrite.c", 425 "zlib_v128/gzwrite.c",
426 "zlib_v128/infback.c", 426 "zlib_v128/infback.c",
427 "zlib_v128/inffast.c", 427 "zlib_v128/inffast.c",
428 "zlib_v128/inflate.c", 428 "zlib_v128/inflate.c",
429 "zlib_v128/inftrees.c", 429 "zlib_v128/inftrees.c",
430 "zlib_v128/trees.c", 430 "zlib_v128/trees.c",
431 "zlib_v128/uncompr.c", 431 "zlib_v128/uncompr.c",
432 "zlib_v128/zutil.c", 432 "zlib_v128/zutil.c",
433 ] 433 ]
434 } 434 }
435 435
436 # Can not be a static library due to lack of .cc files.
436 source_set("pdfium_base") { 437 source_set("pdfium_base") {
437 configs -= [ "//build/config/compiler:chromium_code" ] 438 configs -= [ "//build/config/compiler:chromium_code" ]
438 configs += [ 439 configs += [
439 "//build/config/compiler:no_chromium_code", 440 "//build/config/compiler:no_chromium_code",
440 ":pdfium_third_party_config", 441 ":pdfium_third_party_config",
441 ] 442 ]
442 sources = [ 443 sources = [
443 "base/logging.h", 444 "base/logging.h",
444 "base/macros.h", 445 "base/macros.h",
445 "base/numerics/safe_conversions.h", 446 "base/numerics/safe_conversions.h",
446 "base/numerics/safe_conversions_impl.h", 447 "base/numerics/safe_conversions_impl.h",
447 "base/numerics/safe_math.h", 448 "base/numerics/safe_math.h",
448 "base/numerics/safe_math_impl.h", 449 "base/numerics/safe_math_impl.h",
449 "base/stl_util.h", 450 "base/stl_util.h",
450 ] 451 ]
451 } 452 }
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698