From 6e57f1ee200183b945b6045fe3ebc82441a51464 Mon Sep 17 00:00:00 2001 From: Boernsman Date: Mon, 8 Feb 2021 22:11:45 +0100 Subject: [PATCH] added withoutpyhton config to libnymea-core --- libnymea-core/libnymea-core.pro | 43 ++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/libnymea-core/libnymea-core.pro b/libnymea-core/libnymea-core.pro index 79e322bd..a1f0ce7d 100644 --- a/libnymea-core/libnymea-core.pro +++ b/libnymea-core/libnymea-core.pro @@ -10,26 +10,31 @@ LIBS += -L$$top_builddir/libnymea/ -lnymea -lssl -lcrypto CONFIG += link_pkgconfig 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 -# 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(withoutpython) { + message("Building without python support.") 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]