diff --git a/src/gsiqt/gsiqt.pro b/src/gsiqt/gsiqt.pro index a252b470f..8e0f734e4 100644 --- a/src/gsiqt/gsiqt.pro +++ b/src/gsiqt/gsiqt.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs SUBDIRS = qtbasic -equals(HAVE_QT5, "1") { +greaterThan(QT_MAJOR_VERSION, 4) { SUBDIRS += qt5 qt5.depends += qtbasic } else { diff --git a/src/klayout.pri b/src/klayout.pri index 550c0cba7..01e08ba06 100644 --- a/src/klayout.pri +++ b/src/klayout.pri @@ -178,7 +178,7 @@ equals(HAVE_QT, "0") { } } - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { QT += widgets gui printsupport xmlpatterns diff --git a/src/klayout_main/klayout_main/klayout_main.pro b/src/klayout_main/klayout_main/klayout_main.pro index 31ab7eb22..695f11e88 100644 --- a/src/klayout_main/klayout_main/klayout_main.pro +++ b/src/klayout_main/klayout_main/klayout_main.pro @@ -45,7 +45,7 @@ equals(HAVE_QTBINDINGS, "1") { LIBS += -lklayout_QtUiTools } - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets diff --git a/src/lay/lay/lay.pro b/src/lay/lay/lay.pro index 8a07f7da3..dea36e8e7 100644 --- a/src/lay/lay/lay.pro +++ b/src/lay/lay/lay.pro @@ -207,7 +207,7 @@ equals(HAVE_QTBINDINGS, "1") { !equals(HAVE_QT_XML, "0") { LIBS += -lklayout_QtXml } - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets } } diff --git a/src/laybasic/laybasic/laybasic.pro b/src/laybasic/laybasic/laybasic.pro index 5cf65cefe..309e33a20 100644 --- a/src/laybasic/laybasic/laybasic.pro +++ b/src/laybasic/laybasic/laybasic.pro @@ -310,7 +310,7 @@ DEPENDPATH += $$QTBASIC_INC equals(HAVE_QTBINDINGS, "1") { LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtCore - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets } } diff --git a/src/lib_ut.pri b/src/lib_ut.pri index 92abe0854..e80c7ba32 100644 --- a/src/lib_ut.pri +++ b/src/lib_ut.pri @@ -17,7 +17,7 @@ win32 { QMAKE_POST_LINK += $(COPY) $(DESTDIR)$(TARGET) $$DESTDIR_UT/$${TARGET}.ut } -equals(HAVE_QT5, "1") { +greaterThan(QT_MAJOR_VERSION, 4) { QT += testlib } else { CONFIG += qtestlib diff --git a/src/plugins/tools/view_25d/view_25d.pro b/src/plugins/tools/view_25d/view_25d.pro index 3eb5a6fad..138f0890d 100644 --- a/src/plugins/tools/view_25d/view_25d.pro +++ b/src/plugins/tools/view_25d/view_25d.pro @@ -3,7 +3,7 @@ TEMPLATE = subdirs contains(QT_CONFIG, opengl) { - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { SUBDIRS = lay_plugin unit_tests } diff --git a/src/pymod/QtCore/QtCore.pro b/src/pymod/QtCore/QtCore.pro index b45334bd4..9f7943d23 100644 --- a/src/pymod/QtCore/QtCore.pro +++ b/src/pymod/QtCore/QtCore.pro @@ -10,6 +10,6 @@ HEADERS += \ LIBS += -lklayout_QtCore -lklayout_QtGui -equals(HAVE_QT5, "1") { +greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets } diff --git a/src/pymod/QtGui/QtGui.pro b/src/pymod/QtGui/QtGui.pro index a2f39a5bc..287a0a072 100644 --- a/src/pymod/QtGui/QtGui.pro +++ b/src/pymod/QtGui/QtGui.pro @@ -10,7 +10,7 @@ HEADERS += \ LIBS += -lklayout_QtGui -lklayout_QtCore -equals(HAVE_QT5, "1") { +greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets } diff --git a/src/pymod/QtXml/QtXml.pro b/src/pymod/QtXml/QtXml.pro index a8641948a..0e178a75e 100644 --- a/src/pymod/QtXml/QtXml.pro +++ b/src/pymod/QtXml/QtXml.pro @@ -13,6 +13,6 @@ LIBS += -lklayout_QtCore -lklayout_QtXml # Because of stupid dependency of QtCore on QtGui and this on QtWidgets: LIBS += -lklayout_QtGui -equals(HAVE_QT5, "1") { +greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets } diff --git a/src/pymod/pymod.pro b/src/pymod/pymod.pro index 1b1998702..7b140159f 100644 --- a/src/pymod/pymod.pro +++ b/src/pymod/pymod.pro @@ -18,7 +18,7 @@ SUBDIRS = \ QtCore \ QtGui - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { SUBDIRS += QtWidgets diff --git a/src/pymod/tl/tl.pro b/src/pymod/tl/tl.pro index 2ae8a8b1f..58219f4a0 100644 --- a/src/pymod/tl/tl.pro +++ b/src/pymod/tl/tl.pro @@ -12,7 +12,7 @@ HEADERS += \ # Use this opportunity to provide the __init__.py file equals(HAVE_QTBINDINGS, "1") { - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { INIT_PY = $$PWD/../__init__.py.qt5 } else { INIT_PY = $$PWD/../__init__.py.qt4 diff --git a/src/unit_tests/unit_tests.pro b/src/unit_tests/unit_tests.pro index 1676e614a..0e01149cb 100644 --- a/src/unit_tests/unit_tests.pro +++ b/src/unit_tests/unit_tests.pro @@ -37,7 +37,7 @@ LIBS += -lklayout_gsi_test !equals(HAVE_QT_XML, "0") { LIBS += -lklayout_QtXml } - equals(HAVE_QT5, "1") { + greaterThan(QT_MAJOR_VERSION, 4) { LIBS += -lklayout_QtWidgets } }