Patrick Schurig bb842eea55 sunspec: vendor plugin sources from nymea-plugins-modbus 1.15.2
Vendor the sunspec plugin into this repo so the Fronius work and the
upstream storage fixes can live here. Sources only: build artefacts and
generated plugininfo headers are excluded.

libnymea-sunspec is deliberately NOT vendored - the plugin must stay
rebasable on upstream nymea, so it links against libnymea-sunspec-dev.
sunspec.pri resolves it via pkg-config, with a NYMEA_SUNSPEC_PATH
override for a local sysroot, mirroring modbus.pri.

See sunspec/VENDORED.md.
2026-07-31 10:15:59 +02:00

30 lines
1.3 KiB
Plaintext

QT *= network serialbus
# libnymea-sunspec n'est PAS vendoree : on lie contre le paquet
# libnymea-sunspec-dev. Deux resolutions possibles, meme convention que
# modbus.pri / NYMEA_MODBUS_PATH :
#
# 1) paquet installe systeme -> pkg-config nymea-sunspec (defaut)
# 2) sysroot local -> qmake6 NYMEA_SUNSPEC_PATH=/chemin/vers/sysroot
# ou <sysroot> contient usr/include/nymea-sunspec et usr/lib/<triplet>.
#
# Le paquet 1.15.2 installe les en-tetes des modeles sous
# <includedir>/home/jenkins/nymea-plugins-modbus/libnymea-sunspec/models/
# (le chemin de build Jenkins a fuite dans le .deb). Le plugin fait
# #include <models/sunspecmodelfactory.h>
# qui ne resout donc pas avec le seul -I<includedir>. On ajoute le prefixe
# manquant quand il existe, sans casser une installation correcte.
isEmpty(NYMEA_SUNSPEC_PATH) {
CONFIG += link_pkgconfig
PKGCONFIG += nymea-sunspec
SUNSPEC_INCLUDEDIR = $$[QT_INSTALL_PREFIX]/include/nymea-sunspec
} else {
SUNSPEC_INCLUDEDIR = $$NYMEA_SUNSPEC_PATH/usr/include/nymea-sunspec
INCLUDEPATH += $$SUNSPEC_INCLUDEDIR
LIBS += -L$$NYMEA_SUNSPEC_PATH/usr/lib/$$QMAKE_HOST.arch-linux-gnu -lnymea-sunspec1
}
SUNSPEC_MODELS_WORKAROUND = $$SUNSPEC_INCLUDEDIR/home/jenkins/nymea-plugins-modbus/libnymea-sunspec
exists($$SUNSPEC_MODELS_WORKAROUND/models): INCLUDEPATH += $$SUNSPEC_MODELS_WORKAROUND