WIP: fixed installation target for pymod __init__.py file for older Qt versions.

This commit is contained in:
Matthias Koefferlein 2018-06-20 13:37:41 +02:00
parent e447c175d8
commit 4dc0065028
2 changed files with 21 additions and 18 deletions

View File

@ -10,21 +10,3 @@ HEADERS += \
LIBS += -lklayout_lay
# Use this opportunity to provide the __init__.py file
equals(HAVE_QTBINDINGS, "1") {
equals(HAVE_QT5, "1") {
INIT_PY = $$PWD/../__init__.py.qt5
} else {
INIT_PY = $$PWD/../__init__.py.qt4
}
} else {
INIT_PY = $$PWD/../__init__.py.noqt
}
QMAKE_POST_LINK += && $(COPY) $$INIT_PY $$DESTDIR_PYMOD/__init__.py
# INSTALLS needs to be inside a lib or app templates.
init_target.path = $$PREFIX/pymod/klayout
init_target.files += $$DESTDIR_PYMOD/__init__.py
INSTALLS += init_target

View File

@ -8,3 +8,24 @@ SOURCES = \
HEADERS += \
# Use this opportunity to provide the __init__.py file
equals(HAVE_QTBINDINGS, "1") {
equals(HAVE_QT5, "1") {
INIT_PY = $$PWD/../__init__.py.qt5
} else {
INIT_PY = $$PWD/../__init__.py.qt4
}
} else {
INIT_PY = $$PWD/../__init__.py.noqt
}
QMAKE_POST_LINK += && $(COPY) $$INIT_PY $$DESTDIR_PYMOD/__init__.py
# INSTALLS needs to be inside a lib or app templates.
init_target.path = $$PREFIX/pymod/klayout
# This would be nice:
# init_target.files += $$DESTDIR_PYMOD/__init__.py
# but some Qt versions need this explicitly:
init_target.extra = $(INSTALL_PROGRAM) $$DESTDIR_PYMOD/__init__.py $(INSTALLROOT)$$PREFIX/pymod/klayout
INSTALLS += init_target