Build fixes with pymod

This commit is contained in:
Matthias Koefferlein 2021-12-03 07:28:09 +01:00
parent acf1edb6ce
commit 82909001c4
5 changed files with 80 additions and 2 deletions

View File

@ -0,0 +1,25 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2021 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if QT_VERSION >= 0x060000
# include "../qt6/QtCore5Compat/gsiQtExternals.h"
#endif

View File

@ -0,0 +1,11 @@
TARGET = QtCore5Compat
include($$PWD/../pymod.pri)
SOURCES = \
QtCore5CompatMain.cc \
HEADERS += \
LIBS += -lklayout_QtCore5Compat -lklayout_QtNetwork

View File

@ -0,0 +1,29 @@
/*
KLayout Layout Viewer
Copyright (C) 2006-2021 Matthias Koefferlein
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "../pymodHelper.h"
// To force linking of the QtCore5Compat module
#include "../../gsiqt/qtbasic/gsiQtCore5CompatExternals.h"
FORCE_LINK_GSI_QTCORE5COMPAT
DEFINE_PYMOD(QtCore5Compat, "QtCore5Compat", "KLayout/Qt module 'QtCore5Compat'")

View File

@ -48,6 +48,9 @@ equals(HAVE_QT, "0") {
} else {
# Include QtCore required for some includes
QT = core
greaterThan (QT_MAJOR_VERSION, 5) {
QT += core5compat
}
DEFINES += HAVE_QT
}

View File

@ -35,7 +35,9 @@ SUBDIRS = \
}
!equals(HAVE_QT_XML, "0") {
SUBDIRS += QtXmlPatterns
lessThan(QT_MAJOR_VERSION, 6) {
SUBDIRS += QtXmlPatterns
}
}
}
@ -53,13 +55,21 @@ SUBDIRS = \
}
!equals(HAVE_QT_DESIGNER, "0") {
SUBDIRS += QtDesigner
lessThan(QT_MAJOR_VERSION, 6) {
SUBDIRS += QtDesigner
}
}
!equals(HAVE_QT_UITOOLS, "0") {
SUBDIRS += QtUiTools
}
greaterThan(QT_MAJOR_VERSION, 5) {
!equals(HAVE_QT_CORE5COMPAT, "0") {
SUBDIRS += QtCore5Compat
}
}
}
}