Added a build system option to enable/disable uitools support as some distributions do not support that

This commit is contained in:
Matthias Koefferlein
2021-02-27 18:03:37 +01:00
parent 66199958a5
commit 33ae3b0239
7 changed files with 43 additions and 18 deletions
+4 -2
View File
@@ -1,4 +1,6 @@
include($$PWD/../../klayout.pri)
TEMPLATE = subdirs
SUBDIRS = \
@@ -15,8 +17,8 @@ QtSql.depends += QtCore
QtDesigner.depends += QtCore
QtXml.depends += QtCore
contains(QT_MODULES, uitools) {
# Not all distributions have uitools
equals(HAVE_QT_UITOOLS, "1") {
SUBDIRS += QtUiTools
QtUiTools.depends += QtCore
}
+3 -2
View File
@@ -1,4 +1,6 @@
include($$PWD/../../klayout.pri)
TEMPLATE = subdirs
SUBDIRS = \
@@ -25,8 +27,7 @@ QtSvg.depends += QtCore QtWidgets
QtXmlPatterns.depends += QtCore
QtXml.depends += QtCore
contains(QT_MODULES, uitools) {
# Not all distributions have uitools
equals(HAVE_QT_UITOOLS, "1") {
SUBDIRS += QtUiTools
QtUiTools.depends += QtCore
}
+17 -6
View File
@@ -40,6 +40,15 @@ equals(HAVE_QTBINDINGS, "1") {
DEFINES += HAVE_QTBINDINGS
}
!equals(HAVE_QT_UITOOLS, "0") {
# auto-select uitools, not all distributions have it
contains(QT_MODULES, "uitools") {
HAVE_QT_UITOOLS = 1
} else {
HAVE_QT_UITOOLS = 0
}
}
equals(HAVE_64BIT_COORD, "1") {
DEFINES += HAVE_64BIT_COORD
}
@@ -164,18 +173,20 @@ equals(HAVE_QT, "0") {
equals(HAVE_QT5, "1") {
QT += designer printsupport widgets
contains(QT_MODULES, "uitools") {
# not all distributions have uitools
QT += uitools
}
equals(HAVE_QTBINDINGS, "1") {
QT += multimedia multimediawidgets xmlpatterns svg gui
}
equals(HAVE_QT_UITOOLS, "1") {
QT += uitools
}
} else {
CONFIG += designer uitools
CONFIG += designer
equals(HAVE_QT_UITOOLS, "1") {
CONFIG += uitools
}
}
contains(QT_MODULES, "uitools") {
equals(HAVE_QT_UITOOLS, "1") {
DEFINES += HAVE_QT_UITOOLS
}
@@ -5,6 +5,7 @@ include($$PWD/../../klayout.pri)
TARGET = klayout
include($$PWD/../../klayout.pri)
include($$PWD/../../app.pri)
include($$PWD/../../with_all_libs.pri)
@@ -26,7 +27,7 @@ DEPENDPATH += $$QTBASIC_INC
equals(HAVE_QTBINDINGS, "1") {
LIBS += -lklayout_qtbasic -lklayout_QtGui -lklayout_QtXml -lklayout_QtNetwork -lklayout_QtSql -lklayout_QtDesigner
contains(QT_MODULES, uitools) {
equals(HAVE_QT_UITOOLS, "1") {
LIBS += -lklayout_QtUiTools
}
equals(HAVE_QT5, "1") {
+1 -1
View File
@@ -8,7 +8,7 @@ SOURCES = \
HEADERS += \
contains(QT_MODULES, uitools) {
equals(HAVE_QT_UITOOLS, "1") {
LIBS += -lklayout_QtUiTools
}
+7 -3
View File
@@ -1,4 +1,6 @@
include($$PWD/../klayout.pri)
TEMPLATE = subdirs
SUBDIRS = \
db \
@@ -20,7 +22,6 @@ SUBDIRS = \
QtSql \
QtWidgets \
QtDesigner \
QtUiTools \
QtMultimedia \
QtPrintSupport \
QtSvg \
@@ -35,13 +36,16 @@ SUBDIRS = \
QtXml \
QtSql \
QtNetwork \
QtDesigner \
QtUiTools
QtDesigner
}
}
}
equals(HAVE_QT_UITOOLS, "1") {
SUBDIRS += QtUiTools
}
ALL_DIRS = $$SUBDIRS
SUBDIRS += unit_tests