From 7b434c0287a67eb58413b7f5781d849d2080786f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 11 Feb 2019 15:45:33 +0100 Subject: [PATCH] CMake: Fix build of system jpeg is not available Change-Id: Ie7462db556d0615e74755fa4fc3b51f625aade2f Reviewed-by: Mikhail Svetkin Reviewed-by: Liang Qi --- src/gui/configure.cmake | 2 +- util/cmake/configurejson2cmake.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index 46fb2f993d..f3a439a862 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -644,7 +644,7 @@ qt_feature("ico" PUBLIC PRIVATE qt_feature_definition("ico" "QT_NO_ICO" NEGATE VALUE "1") qt_feature("jpeg" PUBLIC PRIVATE LABEL "JPEG" - CONDITION QT_FEATURE_imageformatplugin + CONDITION QT_FEATURE_imageformatplugin AND JPEG_FOUND DISABLE INPUT_libjpeg STREQUAL 'no' ) qt_feature_definition("jpeg" "QT_NO_IMAGEFORMAT_JPEG" NEGATE) diff --git a/util/cmake/configurejson2cmake.py b/util/cmake/configurejson2cmake.py index 8bf9b77459..23bd81cb5e 100755 --- a/util/cmake/configurejson2cmake.py +++ b/util/cmake/configurejson2cmake.py @@ -698,6 +698,9 @@ def parseFeature(ctx, feature, data, cm_fh): 'condition': 'NOT QT_FEATURE_icu AND QT_FEATURE_textcodec AND ( TEST_posix_iconv OR TEST_sun_iconv )' }, 'incredibuild_xge': None, + 'jpeg': { + 'condition': 'QT_FEATURE_imageformatplugin AND JPEG_FOUND' + }, 'ltcg': None, 'msvc_mp': None, 'optimize_debug': None,