mirror of https://github.com/KLayout/klayout.git
Added a build system option to enable/disable uitools support as some distributions do not support that
This commit is contained in:
parent
66199958a5
commit
33ae3b0239
12
build.sh
12
build.sh
|
|
@ -26,6 +26,7 @@ IS_WINDOWS="no"
|
|||
IS_LINUX="no"
|
||||
|
||||
HAVE_QTBINDINGS=1
|
||||
HAVE_QT_UITOOLS=1
|
||||
HAVE_64BIT_COORD=0
|
||||
HAVE_QT=1
|
||||
HAVE_QT5="" # not set
|
||||
|
|
@ -83,15 +84,18 @@ while [ "$*" != "" ]; do
|
|||
shift
|
||||
|
||||
case $a in
|
||||
-with-qtbinding)
|
||||
HAVE_QTBINDINGS=1
|
||||
;;
|
||||
-without-qt)
|
||||
HAVE_QT=0
|
||||
;;
|
||||
-with-qtbinding)
|
||||
HAVE_QTBINDINGS=1
|
||||
;;
|
||||
-without-qtbinding)
|
||||
HAVE_QTBINDINGS=0
|
||||
;;
|
||||
-without-qt-uitools)
|
||||
HAVE_QT_UITOOLS=0
|
||||
;;
|
||||
-with-64bit-coord)
|
||||
HAVE_64BIT_COORD=1
|
||||
;;
|
||||
|
|
@ -207,6 +211,7 @@ while [ "$*" != "" ]; do
|
|||
echo ""
|
||||
echo " -with-qtbinding Create Qt bindings for ruby scripts [default]"
|
||||
echo " -without-qtbinding Don't create Qt bindings for ruby scripts"
|
||||
echo " -without-qt-uitools Don't include uitools in Qt binding"
|
||||
echo " -with-64bit-coord Use long (64bit) coordinates - EXPERIMENTAL FEATURE"
|
||||
echo " (only available for gcc>=4.4 for 64bit build)"
|
||||
echo " -without-64bit-coord Don't use long (64bit) coordinates [default]"
|
||||
|
|
@ -604,6 +609,7 @@ qmake_options=(
|
|||
PYTHONEXTSUFFIX="$PYTHONEXTSUFFIX"
|
||||
HAVE_PYTHON="$HAVE_PYTHON"
|
||||
HAVE_QTBINDINGS="$HAVE_QTBINDINGS"
|
||||
HAVE_QT_UITOOLS="$HAVE_QT_UITOOLS"
|
||||
HAVE_64BIT_COORD="$HAVE_64BIT_COORD"
|
||||
HAVE_QT="$HAVE_QT"
|
||||
HAVE_QT5="$HAVE_QT5"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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") {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ SOURCES = \
|
|||
|
||||
HEADERS += \
|
||||
|
||||
contains(QT_MODULES, uitools) {
|
||||
equals(HAVE_QT_UITOOLS, "1") {
|
||||
LIBS += -lklayout_QtUiTools
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue