mirror of https://github.com/KLayout/klayout.git
WIP
This commit is contained in:
parent
8b12788084
commit
ca15d9ec9d
|
|
@ -256,7 +256,6 @@ if not exist "%option-build%" (
|
|||
|
||||
echo on
|
||||
"%option-qmake%" ^
|
||||
HAVE_QT5=1 ^
|
||||
HAVE_QT_UITOOLS=1 ^
|
||||
HAVE_QT_NETWORK=1 ^
|
||||
HAVE_QT_SQL=1 ^
|
||||
|
|
|
|||
34
build.sh
34
build.sh
|
|
@ -36,7 +36,6 @@ HAVE_QT_DESIGNER=1
|
|||
HAVE_QT_XML=1
|
||||
HAVE_64BIT_COORD=0
|
||||
HAVE_QT=1
|
||||
HAVE_QT5="" # not set
|
||||
HAVE_CURL=0
|
||||
HAVE_EXPAT=0
|
||||
|
||||
|
|
@ -197,12 +196,6 @@ while [ "$*" != "" ]; do
|
|||
RPATH="$1"
|
||||
shift
|
||||
;;
|
||||
-qt4)
|
||||
HAVE_QT5=0
|
||||
;;
|
||||
-qt5)
|
||||
HAVE_QT5=1
|
||||
;;
|
||||
-dry-run)
|
||||
RUN_MAKE=0
|
||||
;;
|
||||
|
|
@ -302,19 +295,6 @@ if [ "$QMAKE" = "" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# if not given, try to detect the qt major version to use
|
||||
if [ "$HAVE_QT5" = "" ]; then
|
||||
qt_major=`$QMAKE -v | grep 'Using Qt version' | sed 's/.*version *\([0-9][0-9]*\).*/\1/'`
|
||||
if [ "$qt_major" = "4" ]; then
|
||||
HAVE_QT5=0
|
||||
elif [ "$qt_major" = "5" ]; then
|
||||
HAVE_QT5=1
|
||||
else
|
||||
echo "*** ERROR: could not determine Qt version from '$QMAKE -v'"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Using qmake: $QMAKE"
|
||||
echo ""
|
||||
|
||||
|
|
@ -492,11 +472,7 @@ if [ $HAVE_QT = 0 ]; then
|
|||
echo " Qt not used at all"
|
||||
fi
|
||||
if [ $HAVE_QTBINDINGS != 0 ]; then
|
||||
if [ "$HAVE_QT5" != "0" ]; then
|
||||
echo " Qt bindings enabled (Qt 5 API)"
|
||||
else
|
||||
echo " Qt bindings enabled (Qt 4 API)"
|
||||
fi
|
||||
echo " Qt bindings enabled"
|
||||
fi
|
||||
if [ $HAVE_64BIT_COORD != 0 ]; then
|
||||
echo " 64 bit coordinates enabled"
|
||||
|
|
@ -613,13 +589,6 @@ echo ""
|
|||
echo "Running $QMAKE .."
|
||||
cd $BUILD
|
||||
|
||||
# chose the right qmake
|
||||
if [ $HAVE_QT5 = 0 ]; then
|
||||
export QT_SELECT=4
|
||||
else
|
||||
export QT_SELECT=5
|
||||
fi
|
||||
|
||||
$QMAKE -v
|
||||
|
||||
# Force a minimum rebuild because of version info
|
||||
|
|
@ -647,7 +616,6 @@ qmake_options=(
|
|||
HAVE_QT_XML="$HAVE_QT_XML"
|
||||
HAVE_64BIT_COORD="$HAVE_64BIT_COORD"
|
||||
HAVE_QT="$HAVE_QT"
|
||||
HAVE_QT5="$HAVE_QT5"
|
||||
HAVE_CURL="$HAVE_CURL"
|
||||
HAVE_EXPAT="$HAVE_EXPAT"
|
||||
PREFIX="$BIN"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ main (int argc, char *argv [])
|
|||
|
||||
QFontMetrics fm (f);
|
||||
|
||||
int w = fm.width (QChar::fromLatin1 ('W'));
|
||||
int w = fm.averageCharWidth ();
|
||||
|
||||
printf ("\n// Font: %s\n", f.toString ().toLatin1 ().constData ());
|
||||
printf ("const unsigned int ff%d_height = %d;\nconst unsigned int ff%d_line_height = %d;\nconst unsigned int ff%d_width = %d;\nconst unsigned int ff%d_stride = %d;\n",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
TEMPLATE = subdirs
|
||||
SUBDIRS = qtbasic
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
SUBDIRS += qt5
|
||||
qt5.depends += qtbasic
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ equals(HAVE_QT, "0") {
|
|||
}
|
||||
}
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
|
||||
QT += widgets gui printsupport xmlpatterns
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ equals(HAVE_QTBINDINGS, "1") {
|
|||
LIBS += -lklayout_QtUiTools
|
||||
}
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
|
||||
LIBS += -lklayout_QtWidgets
|
||||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ equals(HAVE_QTBINDINGS, "1") {
|
|||
!equals(HAVE_QT_XML, "0") {
|
||||
LIBS += -lklayout_QtXml
|
||||
}
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, "4") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ win32 {
|
|||
QMAKE_POST_LINK += $(COPY) $(DESTDIR)$(TARGET) $$DESTDIR_UT/$${TARGET}.ut
|
||||
}
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
QT += testlib
|
||||
} else {
|
||||
CONFIG += qtestlib
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ TEMPLATE = subdirs
|
|||
|
||||
contains(QT_CONFIG, opengl) {
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
SUBDIRS = lay_plugin unit_tests
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ HEADERS += \
|
|||
|
||||
LIBS += -lklayout_QtCore -lklayout_QtGui
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ HEADERS += \
|
|||
|
||||
LIBS += -lklayout_QtGui -lklayout_QtCore
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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, "4") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ SUBDIRS = \
|
|||
QtCore \
|
||||
QtGui
|
||||
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
|
||||
SUBDIRS += QtWidgets
|
||||
|
||||
|
|
|
|||
|
|
@ -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, "4") {
|
||||
INIT_PY = $$PWD/../__init__.py.qt5
|
||||
} else {
|
||||
INIT_PY = $$PWD/../__init__.py.qt4
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ LIBS += -lklayout_gsi_test
|
|||
!equals(HAVE_QT_XML, "0") {
|
||||
LIBS += -lklayout_QtXml
|
||||
}
|
||||
equals(HAVE_QT5, "1") {
|
||||
greaterThan(QT_MAJOR, "4") {
|
||||
LIBS += -lklayout_QtWidgets
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue