diff --git a/nymea-plugins.pro b/nymea-plugins.pro index 53b4111..6296268 100644 --- a/nymea-plugins.pro +++ b/nymea-plugins.pro @@ -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") } diff --git a/plugins.pri b/plugins.pri index ac74e25..009dd0d 100644 --- a/plugins.pri +++ b/plugins.pri @@ -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