Change the way we handle features that have sub-features

Make sure we always set the base feature as a flag in qtconfig, and
set the sub-feature in addition if it's being used.

Change-Id: Icfeb0ec1ac9e1a615b5b22eb5fcce47e0e7fc153
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Lars Knoll 2016-03-29 10:02:17 +02:00
parent a4a83f52f9
commit dd22889ed6
8 changed files with 42 additions and 57 deletions

14
configure vendored
View File

@ -6207,26 +6207,22 @@ fi
if [ "$CFG_GIF" = "yes" ]; then
QT_CONFIG="$QT_CONFIG gif"
fi
if [ "$CFG_DOUBLECONVERSION" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-doubleconversion"
elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-doubleconversion"
if [ "$CFG_DOUBLECONVERSION" = "system" ]; then
QT_CONFIG="$QT_CONFIG doubleconversion system-doubleconversion"
else
QT_CONFIG="$QT_CONFIG doubleconversion"
fi
if [ "$CFG_FREETYPE" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-freetype"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
elif [ "$CFG_FREETYPE" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-freetype"
QT_CONFIG="$QT_CONFIG freetype system-freetype"
else
QT_CONFIG="$QT_CONFIG freetype"
fi
if [ "$CFG_HARFBUZZ" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-harfbuzz"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_HARFBUZZ"
elif [ "$CFG_HARFBUZZ" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-harfbuzz"
QT_CONFIG="$QT_CONFIG harfbuzz system-harfbuzz"
else
QT_CONFIG="$QT_CONFIG harfbuzz"
fi
@ -6254,7 +6250,7 @@ fi
[ "$CFG_MTDEV" = "yes" ] && QT_CONFIG="$QT_CONFIG mtdev"
[ "$CFG_NIS" = "yes" ] && QT_CONFIG="$QT_CONFIG nis"
[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
[ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
[ "$CFG_ICONV" != "no" ] && QT_CONFIG="$QT_CONFIG iconv"
[ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
[ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
[ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"

View File

@ -1,7 +1,7 @@
contains(QT_CONFIG, freetype) {
INCLUDEPATH += $$PWD/freetype/include
LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtfreetype$$qtPlatformTargetSuffix()
} else:contains(QT_CONFIG, system-freetype) {
contains(QT_CONFIG, system-freetype) {
# pull in the proper freetype2 include directory
include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
} else: contains(QT_CONFIG, freetype) {
INCLUDEPATH += $$PWD/freetype/include
LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtfreetype$$qtPlatformTargetSuffix()
}

View File

@ -1,6 +1,6 @@
contains(QT_CONFIG, harfbuzz) {
contains(QT_CONFIG, system-harfbuzz) {
LIBS_PRIVATE += -lharfbuzz
} else: contains(QT_CONFIG, harfbuzz) {
INCLUDEPATH += $$PWD/harfbuzz-ng/include
LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix()
} else:contains(QT_CONFIG, system-harfbuzz) {
LIBS_PRIVATE += -lharfbuzz
}

View File

@ -41,19 +41,16 @@ contains(QT_CONFIG,icu) {
codecs/qbig5codec.cpp
unix:!qnx:!mac:!ios:!linux-android-* {
contains(QT_CONFIG,iconv) {
HEADERS += codecs/qiconvcodec_p.h
SOURCES += codecs/qiconvcodec.cpp
} else:contains(QT_CONFIG,gnu-libiconv) {
HEADERS += codecs/qiconvcodec_p.h
SOURCES += codecs/qiconvcodec.cpp
DEFINES += GNU_LIBICONV
LIBS_PRIVATE *= -liconv
} else:contains(QT_CONFIG,sun-libiconv) {
HEADERS += codecs/qiconvcodec_p.h
SOURCES += codecs/qiconvcodec.cpp
DEFINES += GNU_LIBICONV
contains(QT_CONFIG, iconv) {
HEADERS += codecs/qiconvcodec_p.h
SOURCES += codecs/qiconvcodec.cpp
contains(QT_CONFIG, gnu-libiconv) {
DEFINES += GNU_LIBICONV
LIBS_PRIVATE *= -liconv
} else: contains(QT_CONFIG, sun-libiconv) {
DEFINES += GNU_LIBICONV
}
}
} else:!win32-msvc* {
DEFINES += QT_NO_ICONV
}

View File

@ -197,12 +197,10 @@ INCLUDEPATH += ../3rdparty/md5 \
../3rdparty/md4 \
../3rdparty/sha3
contains(QT_CONFIG, doubleconversion) {
include($$PWD/../../3rdparty/double-conversion/double-conversion.pri)
} else:contains(QT_CONFIG, system-doubleconversion) {
contains(QT_CONFIG, system-doubleconversion) {
LIBS_PRIVATE += -ldouble-conversion
} else {
DEFINES += QT_NO_DOUBLECONVERSION
} else: contains(QT_CONFIG, doubleconversion) {
include($$PWD/../../3rdparty/double-conversion/double-conversion.pri)
}
# Note: libm should be present by default becaue this is C++

View File

@ -110,18 +110,14 @@ contains(QT_CONFIG,dynamicgl) {
RESOURCES += $$PWD/openglblacklists.qrc
contains(QT_CONFIG, freetype) {
DEFINES *= QT_NO_FONTCONFIG
include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri)
HEADERS += \
$$PWD/qwindowsfontdatabase_ft.h
SOURCES += \
$$PWD/qwindowsfontdatabase_ft.cpp
} else:contains(QT_CONFIG, system-freetype) {
include($$QT_SOURCE_TREE/src/platformsupport/fontdatabases/basic/basic.pri)
HEADERS += \
$$PWD/qwindowsfontdatabase_ft.h
SOURCES += \
$$PWD/qwindowsfontdatabase_ft.cpp
HEADERS += $$PWD/qwindowsfontdatabase_ft.h
SOURCES += $$PWD/qwindowsfontdatabase_ft.cpp
contains(QT_CONFIG, system-freetype) {
include($$QT_SOURCE_TREE/src/platformsupport/fontdatabases/basic/basic.pri)
} else {
DEFINES *= QT_NO_FONTCONFIG
include($$QT_SOURCE_TREE/src/3rdparty/freetype_dependency.pri)
}
}
contains(QT_CONFIG, accessibility):include($$PWD/accessible/accessible.pri)

View File

@ -149,7 +149,7 @@ contains(QT_CONFIG, dbus) {
}
contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent
!contains(QT_CONFIG, no-gui) {
contains(QT_CONFIG, harfbuzz) {
contains(QT_CONFIG, harfbuzz):!contains(QT_CONFIG, system-harfbuzz) {
SUBDIRS += src_3rdparty_harfbuzzng
src_gui.depends += src_3rdparty_harfbuzzng
}
@ -157,7 +157,7 @@ contains(QT_CONFIG, concurrent):SUBDIRS += src_concurrent
SUBDIRS += src_angle
src_gui.depends += src_angle
}
contains(QT_CONFIG, freetype) {
contains(QT_CONFIG, freetype):!contains(QT_CONFIG, system-freetype) {
SUBDIRS += src_3rdparty_freetype
src_platformsupport.depends += src_3rdparty_freetype
}

View File

@ -2632,22 +2632,20 @@ void Configure::generateOutputVars()
qtConfig += "system-png";
// Double conversion -----------------------------------------------
if (dictionary[ "DOUBLECONVERSION" ] == "qt")
if (dictionary[ "DOUBLECONVERSION" ] != "no")
qtConfig += "doubleconversion";
else if (dictionary[ "DOUBLECONVERSION" ] == "system")
if (dictionary[ "DOUBLECONVERSION" ] == "system")
qtConfig += "system-doubleconversion";
else if (dictionary[ "DOUBLECONVERSION" ] == "no")
qtConfig += "no-doubleconversion";
// Text rendering --------------------------------------------------
if (dictionary[ "FREETYPE" ] == "yes")
if (dictionary[ "FREETYPE" ] != "no")
qtConfig += "freetype";
else if (dictionary[ "FREETYPE" ] == "system")
if (dictionary[ "FREETYPE" ] == "system")
qtConfig += "system-freetype";
if (dictionary[ "HARFBUZZ" ] == "qt")
if (dictionary[ "HARFBUZZ" ] != "no")
qtConfig += "harfbuzz";
else if (dictionary[ "HARFBUZZ" ] == "system")
if (dictionary[ "HARFBUZZ" ] == "system")
qtConfig += "system-harfbuzz";
// Styles -------------------------------------------------------
@ -2787,9 +2785,9 @@ void Configure::generateOutputVars()
if (dictionary["QT_CUPS"] == "yes")
qtConfig += "cups";
if (dictionary["QT_ICONV"] == "yes")
if (dictionary["QT_ICONV"] != "no")
qtConfig += "iconv";
else if (dictionary["QT_ICONV"] == "sun")
if (dictionary["QT_ICONV"] == "sun")
qtConfig += "sun-libiconv";
else if (dictionary["QT_ICONV"] == "gnu")
qtConfig += "gnu-libiconv";