summaryrefslogtreecommitdiffstats
path: root/cmake/FindSensorfw.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindSensorfw.cmake')
-rw-r--r--cmake/FindSensorfw.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/FindSensorfw.cmake b/cmake/FindSensorfw.cmake
new file mode 100644
index 00000000..6b7ee507
--- /dev/null
+++ b/cmake/FindSensorfw.cmake
@@ -0,0 +1,10 @@
+find_package(PkgConfig)
+if (PKG_CONFIG_FOUND)
+ pkg_check_modules(Sensorfw sensord-qt5 IMPORTED_TARGET)
+ if (NOT TARGET PkgConfig::Sensorfw)
+ set(Sensorfw_FOUND 0)
+ endif()
+else()
+ message("Sensorfw pkg not found. Looking for library")
+ find_library(sensorfw)
+endif()