From bcebe321b5cb4b72a4abe9058e315ea22a5bc6e3 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Tue, 16 Jan 2024 15:40:11 -0700 Subject: [PATCH] Fix epaper build --- applications/system-service/application.cpp | 6 ++++-- applications/system-service/appsapi.cpp | 4 +++- applications/system-service/notification.cpp | 4 +++- applications/system-service/notificationapi.cpp | 4 +++- qmake/epaper.pri | 1 + shared/liboxide/liboxide.h | 2 -- shared/shared.pro | 7 +++++-- 7 files changed, 19 insertions(+), 9 deletions(-) diff --git a/applications/system-service/application.cpp b/applications/system-service/application.cpp index b2c5d996c..73de33ef5 100644 --- a/applications/system-service/application.cpp +++ b/applications/system-service/application.cpp @@ -10,11 +10,13 @@ #include "systemapi.h" #include "digitizerhandler.h" #include "notificationapi.h" -#include "mxcfb.h" #include "screenapi.h" #include "buttonhandler.h" -#ifndef EPAPER +#ifdef EPAPER +#include "mxcfb.h" +#include +#else #define FRAMEBUFFER new QImage(200, 200, QImage::Format_ARGB32_Premultiplied) #endif diff --git a/applications/system-service/appsapi.cpp b/applications/system-service/appsapi.cpp index ef40eb6b4..ce270b0d1 100644 --- a/applications/system-service/appsapi.cpp +++ b/applications/system-service/appsapi.cpp @@ -4,7 +4,9 @@ #include "notificationapi.h" #include "systemapi.h" -#ifndef EPAPER +#ifdef EPAPER +#include +#else #define FRAMEBUFFER new QImage(200, 200, QImage::Format_ARGB32_Premultiplied) #endif diff --git a/applications/system-service/notification.cpp b/applications/system-service/notification.cpp index a135d4227..c8203ef89 100644 --- a/applications/system-service/notification.cpp +++ b/applications/system-service/notification.cpp @@ -5,7 +5,9 @@ #include "appsapi.h" #include "screenapi.h" -#ifndef EPAPER +#ifdef EPAPER +#include +#else #define FRAMEBUFFER new QImage(200, 200, QImage::Format_ARGB32_Premultiplied) #endif diff --git a/applications/system-service/notificationapi.cpp b/applications/system-service/notificationapi.cpp index c21435d63..0379b88c8 100644 --- a/applications/system-service/notificationapi.cpp +++ b/applications/system-service/notificationapi.cpp @@ -2,7 +2,9 @@ #include "notificationapi.h" #include "systemapi.h" -#ifndef EPAPER +#ifdef EPAPER +#include +#else #define FRAMEBUFFER new QImage(200, 200, QImage::Format_ARGB32_Premultiplied) #endif diff --git a/qmake/epaper.pri b/qmake/epaper.pri index f6fef5420..3a1784ae0 100644 --- a/qmake/epaper.pri +++ b/qmake/epaper.pri @@ -1,4 +1,5 @@ linux-oe-g++{ LIBS += -L$$OUT_PWD/../../shared/epaper -lqsgepaper INCLUDEPATH += $$OUT_PWD/../../shared/epaper + DEFINES += EPAPER } diff --git a/shared/liboxide/liboxide.h b/shared/liboxide/liboxide.h index e802e4148..a0af97e19 100644 --- a/shared/liboxide/liboxide.h +++ b/shared/liboxide/liboxide.h @@ -25,12 +25,10 @@ #include "oxide_sentry.h" #else #include "sentry.h" -#ifdef __arm__ #ifdef EPAPER Q_IMPORT_PLUGIN(QsgEpaperPlugin) #endif #endif -#endif #include #include diff --git a/shared/shared.pro b/shared/shared.pro index 6133dd034..1bf9b19d8 100644 --- a/shared/shared.pro +++ b/shared/shared.pro @@ -4,8 +4,11 @@ SUBDIRS = \ liboxide linux-oe-g++{ - SUBDIRS += sentry SUBDIRS += epaper - liboxide.depends = sentry epaper + liboxide.depends += epaper + contains(DEFINES, SENTRY){ + SUBDIRS += sentry + liboxide.depends += sentry + } } INSTALLS += $$SUBDIRS