Don't use dpkg specific tools to set install path
parent
1250636a5e
commit
f3956835c7
|
|
@ -49,8 +49,6 @@ PLUGIN_DIRS = \
|
||||||
ws2812 \
|
ws2812 \
|
||||||
|
|
||||||
|
|
||||||
CONFIG+=all
|
|
||||||
|
|
||||||
message(============================================)
|
message(============================================)
|
||||||
message("Qt version:" $$[QT_VERSION])
|
message("Qt version:" $$[QT_VERSION])
|
||||||
|
|
||||||
|
|
@ -73,12 +71,9 @@ QMAKE_EXTRA_TARGETS += lrelease
|
||||||
|
|
||||||
# For Qt-Creator's code model: Add CPATH to INCLUDEPATH explicitly
|
# For Qt-Creator's code model: Add CPATH to INCLUDEPATH explicitly
|
||||||
INCLUDEPATH += $$(CPATH)
|
INCLUDEPATH += $$(CPATH)
|
||||||
message(" cpath is $$(CPATH)")
|
|
||||||
|
|
||||||
# Verify if building only a selection of plugins
|
# Verify if building only a selection of plugins
|
||||||
contains(CONFIG, selection) {
|
contains(CONFIG, selection) {
|
||||||
CONFIG-=all
|
|
||||||
|
|
||||||
# Check each plugin if the subdir exists
|
# Check each plugin if the subdir exists
|
||||||
for(plugin, PLUGINS) {
|
for(plugin, PLUGINS) {
|
||||||
contains(PLUGIN_DIRS, $${plugin}) {
|
contains(PLUGIN_DIRS, $${plugin}) {
|
||||||
|
|
@ -88,9 +83,7 @@ contains(CONFIG, selection) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
message("Building plugin selection: $${SUBDIRS}")
|
message("Building plugin selection: $${SUBDIRS}")
|
||||||
}
|
} else {
|
||||||
|
|
||||||
all {
|
|
||||||
SUBDIRS *= $${PLUGIN_DIRS}
|
SUBDIRS *= $${PLUGIN_DIRS}
|
||||||
message("Building all plugins")
|
message("Building all plugins")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,13 @@ CONFIG += plugin
|
||||||
QMAKE_CXXFLAGS += -Werror -std=c++11 -g
|
QMAKE_CXXFLAGS += -Werror -std=c++11 -g
|
||||||
QMAKE_LFLAGS += -std=c++11
|
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
|
LIBS += -lnymea
|
||||||
HEADERS += $${OUT_PWD}/plugininfo.h \
|
HEADERS += $${OUT_PWD}/plugininfo.h \
|
||||||
$${OUT_PWD}/extern-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
|
# Check if this is a snap build
|
||||||
snappy{
|
snappy{
|
||||||
INCLUDEPATH+=$$(SNAPCRAFT_STAGE)/usr/include/nymea
|
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)
|
TRANSLATIONS += $$files($$[QT_SOURCE_TREE]/translations/*.ts, true)
|
||||||
|
|
||||||
# Install plugin
|
# Install plugin
|
||||||
target.path = $$PLUGIN_PATH
|
target.path = $$[QT_INSTALL_LIBS]/nymea/plugins/
|
||||||
INSTALLS += target translations
|
INSTALLS += target translations
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue