Description: Use system lcms2 Author: Sandro Knauß Origin: Debian Forwarded: https://bugreports.qt.io/browse/QTBUG-61746 Reviewed-by: Sandro Knauß Last-Update: 2021-03-08 --- This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn +++ b/src/3rdparty/chromium/third_party/pdfium/third_party/BUILD.gn @@ -239,58 +239,19 @@ if (!pdf_use_skia && !pdf_use_skia_paths } } -config("fx_lcms2_warnings") { - visibility = [ ":*" ] - if (is_clang) { - cflags = [ - # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this - # library doesn't appear to have this problem. - "-Wno-missing-braces", - ] - } +import("//build/shim_headers.gni") + +shim_headers("lcms2_shim") { + root_path = "lcms/include" + headers = [ + "lcms2.h", + "lcms2_plugin.h", + ] } source_set("fx_lcms2") { - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - "//build/config/sanitizers:cfi_icall_generalize_pointers", - ":pdfium_third_party_config", - - # Must be after no_chromium_code for warning flags to be ordered correctly. - ":fx_lcms2_warnings", - ] - sources = [ - "lcms/include/lcms2.h", - "lcms/include/lcms2_plugin.h", - "lcms/src/cmsalpha.c", - "lcms/src/cmscam02.c", - "lcms/src/cmscgats.c", - "lcms/src/cmscnvrt.c", - "lcms/src/cmserr.c", - "lcms/src/cmsgamma.c", - "lcms/src/cmsgmt.c", - "lcms/src/cmshalf.c", - "lcms/src/cmsintrp.c", - "lcms/src/cmsio0.c", - "lcms/src/cmsio1.c", - "lcms/src/cmslut.c", - "lcms/src/cmsmd5.c", - "lcms/src/cmsmtrx.c", - "lcms/src/cmsnamed.c", - "lcms/src/cmsopt.c", - "lcms/src/cmspack.c", - "lcms/src/cmspcs.c", - "lcms/src/cmsplugin.c", - "lcms/src/cmsps2.c", - "lcms/src/cmssamp.c", - "lcms/src/cmssm.c", - "lcms/src/cmstypes.c", - "lcms/src/cmsvirt.c", - "lcms/src/cmswtpnt.c", - "lcms/src/cmsxform.c", - ] - deps = [ "../core/fxcrt" ] + deps = [ ":lcms2_shim" ] + libs = ["lcms2"] } if (!build_with_chromium) {