diff options
author | Michal Klocek <michal.klocek@qt.io> | 2019-09-23 10:12:09 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2020-01-20 10:37:42 +0000 |
commit | a9a20127e8adeb3f3cd7921b0bec32083103cc5c (patch) | |
tree | 471d4d4267f626492caceeb87ca39c218bfb1837 | |
parent | 3bbfff059e381412e2976b1e7dc1d6626280f0c0 (diff) |
Improve jpeg headers handlingv5.14.1
Add pkg-config support to libjpeg.
Add shim support, it seems that some features from pdfium
are using libjpeg.h.
This is re-uploaded from 73-based.
Task-number: QTBUG-77827
Change-Id: I671f16899e86057a83efdb48332cbf496da39788
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/third_party/BUILD.gn | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/chromium/third_party/BUILD.gn b/chromium/third_party/BUILD.gn index 3c14675691f..41bcc6d0aa9 100644 --- a/chromium/third_party/BUILD.gn +++ b/chromium/third_party/BUILD.gn @@ -11,8 +11,27 @@ if (!use_qt) { assert(!is_ios, "This is not used on iOS, don't drag it in unintentionally") } +if (use_system_libjpeg) { + import("//build/config/linux/pkg_config.gni") + import("//build/shim_headers.gni") + pkg_config("system_libjpeg") { + packages = [ "libjpeg" ] + } + shim_headers("libjpeg_shim") { + root_path = "libjpeg" + headers = [ + "jpeglib.h" + ] + } + source_set("libjpeg") { + deps = [ ":libjpeg_shim" ] + public_configs = [ ":system_libjpeg", + ":system_libjpeg_config" + ] + } +} + config("system_libjpeg_config") { - libs = [ "jpeg" ] defines = [ "USE_SYSTEM_LIBJPEG" ] } @@ -25,7 +44,7 @@ config("libjpeg_turbo_config") { # declared in this file. group("jpeg") { if (use_system_libjpeg) { - public_configs = [ ":system_libjpeg_config" ] + public_deps = [ ":libjpeg" ] } else if (use_libjpeg_turbo) { public_deps = [ "//third_party/libjpeg_turbo:libjpeg", @@ -44,7 +63,7 @@ group("jpeg") { # need to reference libjpeg without explicitly building it. group("jpeg_includes") { if (use_system_libjpeg) { - public_configs = [ ":system_libjpeg_config" ] + public_configs = [ ":system_libjpeg_config", ":system_libjpeg" ] } else if (use_libjpeg_turbo) { public_configs = [ "//third_party/libjpeg_turbo:libjpeg_config" ] } else { |