Don't use dpkg specific tools to set install path

pull/1/head
Michael Zanetti 2019-04-17 18:36:02 +02:00
parent 1250636a5e
commit f3956835c7
2 changed files with 5 additions and 12 deletions

View File

@ -49,8 +49,6 @@ PLUGIN_DIRS = \
ws2812 \
CONFIG+=all
message(============================================)
message("Qt version:" $$[QT_VERSION])
@ -73,12 +71,9 @@ QMAKE_EXTRA_TARGETS += lrelease
# For Qt-Creator's code model: Add CPATH to INCLUDEPATH explicitly
INCLUDEPATH += $$(CPATH)
message(" cpath is $$(CPATH)")
# Verify if building only a selection of plugins
contains(CONFIG, selection) {
CONFIG-=all
# Check each plugin if the subdir exists
for(plugin, PLUGINS) {
contains(PLUGIN_DIRS, $${plugin}) {
@ -88,9 +83,7 @@ contains(CONFIG, selection) {
}
}
message("Building plugin selection: $${SUBDIRS}")
}
all {
} else {
SUBDIRS *= $${PLUGIN_DIRS}
message("Building all plugins")
}

View File

@ -4,13 +4,13 @@ CONFIG += plugin
QMAKE_CXXFLAGS += -Werror -std=c++11 -g
QMAKE_LFLAGS += -std=c++11
INCLUDEPATH += /usr/include/nymea
# FIXME: Ideally libnymea-dev would ship pkgconfig files so we get libnymea includes from there
INCLUDEPATH += $$[QT_INSTALL_HEADERS]/../nymea
LIBS += -lnymea
HEADERS += $${OUT_PWD}/plugininfo.h \
$${OUT_PWD}/extern-plugininfo.h
PLUGIN_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/nymea/plugins/
# Check if this is a snap build
snappy{
INCLUDEPATH+=$$(SNAPCRAFT_STAGE)/usr/include/nymea
@ -55,6 +55,6 @@ translations.files = $$[QT_SOURCE_TREE]/translations/*.qm
TRANSLATIONS += $$files($$[QT_SOURCE_TREE]/translations/*.ts, true)
# Install plugin
target.path = $$PLUGIN_PATH
target.path = $$[QT_INSTALL_LIBS]/nymea/plugins/
INSTALLS += target translations