From b36eb0e66df0e7166ef38a5039e0635ce06c7bb2 Mon Sep 17 00:00:00 2001
From: MagneFire <dgriet@gmail.com>
Date: Tue, 11 Jan 2022 23:39:11 +0100
Subject: [PATCH 4/4] Fix compilation when hybris is used. Fixes compilation by
 adding android-headers via pkgconfig and re-adding the hybris subdirs when
 autohybris is used.

---
 adaptors/adaptor-config.pri |  4 ++++
 adaptors/adaptors.pro       | 14 ++++++++++++++
 core/hybris.pro             |  3 +++
 3 files changed, 21 insertions(+)

diff --git a/adaptors/adaptor-config.pri b/adaptors/adaptor-config.pri
index e8e1d79..cfcf90f 100644
--- a/adaptors/adaptor-config.pri
+++ b/adaptors/adaptor-config.pri
@@ -16,3 +16,7 @@ publicheaders.files += $$HEADERS
 target.path = $$PLUGINPATH
 
 INSTALLS += target
+
+config_hybris {
+    CONFIG += link_pkgconfig
+}
diff --git a/adaptors/adaptors.pro b/adaptors/adaptors.pro
index 665716d..b6deb57 100644
--- a/adaptors/adaptors.pro
+++ b/adaptors/adaptors.pro
@@ -56,6 +56,20 @@ SUBDIRS += mpu6050accelerometer
 
 }
 
+config_hybris {
+    SUBDIRS = hybrisaccelerometer
+    SUBDIRS += hybrisalsadaptor
+    SUBDIRS += hybrisgyroscopeadaptor
+    SUBDIRS += hybrismagnetometeradaptor
+    SUBDIRS += hybrispressureadaptor
+    SUBDIRS += hybrisproximityadaptor
+    SUBDIRS += hybrisorientationadaptor
+    SUBDIRS += hybrisrotationadaptor
+    SUBDIRS += hybrisgeorotationadaptor
+    SUBDIRS += hybrisstepcounteradaptor
+    SUBDIRS += hybrishrmadaptor
+    SUBDIRS += hybriswristgestureadaptor
+}
 }
 
 
diff --git a/core/hybris.pro b/core/hybris.pro
index ebf9ed3..6d7049d 100644
--- a/core/hybris.pro
+++ b/core/hybris.pro
@@ -5,6 +5,9 @@ TARGET = hybrissensorfw
 
 include( ../common-config.pri )
 
+CONFIG += link_pkgconfig
+PKGCONFIG += android-headers
+
 SENSORFW_INCLUDEPATHS = .. \
                         ../include \
                         ../filters \
-- 
2.34.1

