added withoutpyhton config to libnymea-core
This commit is contained in:
parent
493b211eec
commit
6e57f1ee20
@ -10,26 +10,31 @@ LIBS += -L$$top_builddir/libnymea/ -lnymea -lssl -lcrypto
|
|||||||
CONFIG += link_pkgconfig
|
CONFIG += link_pkgconfig
|
||||||
PKGCONFIG += nymea-mqtt nymea-networkmanager nymea-zigbee
|
PKGCONFIG += nymea-mqtt nymea-networkmanager nymea-zigbee
|
||||||
|
|
||||||
# As of Ubuntu focal, there's a commonly named python3-embed pointing to the distro version of python
|
CONFIG(withoutpython) {
|
||||||
# For everything below python 3.8 we need to manually select one
|
message("Building without python support.")
|
||||||
packagesExist(python3-embed) {
|
|
||||||
PKGCONFIG += python3-embed
|
|
||||||
CONFIG += python
|
|
||||||
} else:packagesExist(python-3.5) {
|
|
||||||
# xenial, stretch
|
|
||||||
PKGCONFIG += python-3.5
|
|
||||||
CONFIG += python
|
|
||||||
} else:packagesExist(python-3.6) {
|
|
||||||
# bionic
|
|
||||||
PKGCONFIG += python-3.6
|
|
||||||
CONFIG += python
|
|
||||||
} else:packagesExist(python-3.7) {
|
|
||||||
# buster, eoan
|
|
||||||
PKGCONFIG += python-3.7
|
|
||||||
CONFIG += python
|
|
||||||
} else {
|
|
||||||
message("Python development package not found. Building without python support.")
|
|
||||||
CONFIG -= python
|
CONFIG -= python
|
||||||
|
} else {
|
||||||
|
# As of Ubuntu focal, there's a commonly named python3-embed pointing to the distro version of python
|
||||||
|
# For everything below python 3.8 we need to manually select one
|
||||||
|
packagesExist(python3-embed) {
|
||||||
|
PKGCONFIG += python3-embed
|
||||||
|
CONFIG += python
|
||||||
|
} else:packagesExist(python-3.5) {
|
||||||
|
# xenial, stretch
|
||||||
|
PKGCONFIG += python-3.5
|
||||||
|
CONFIG += python
|
||||||
|
} else:packagesExist(python-3.6) {
|
||||||
|
# bionic
|
||||||
|
PKGCONFIG += python-3.6
|
||||||
|
CONFIG += python
|
||||||
|
} else:packagesExist(python-3.7) {
|
||||||
|
# buster, eoan
|
||||||
|
PKGCONFIG += python-3.7
|
||||||
|
CONFIG += python
|
||||||
|
} else {
|
||||||
|
message("Python development package not found. Building without python support.")
|
||||||
|
CONFIG -= python
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target.path = $$[QT_INSTALL_LIBS]
|
target.path = $$[QT_INSTALL_LIBS]
|
||||||
|
|||||||
Reference in New Issue
Block a user