summaryrefslogtreecommitdiff
path: root/src/imports
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2021-01-06 07:30:03 +1000
committerJuha Vuolle <juha.vuolle@insta.fi>2021-04-19 13:29:47 +0300
commit45c8ae3232df8955644697ee88c4321f26bb5cf2 (patch)
tree77edea26c249ce6bb8a921fe67c266d3c95e094a /src/imports
parent5a8aa096dc61336ac95734e8cc61f106e359c865 (diff)
downloadqtsensors-45c8ae3232df8955644697ee88c4321f26bb5cf2.tar.gz
QtSensors initial cmake support
This commit introduces the bare minimum cmake support that should unblock the CI and allow further verification and development on most platforms: macOS, Linux, Win, iOS and Android. Some clarifications: * The support for sensorfw backend is very preliminary and can be enabled later if needed (no Qt6 version of the sensorfw). * The simulator backend is dropped as obsolete / unnecessary. * Three examples are currently commented out and shall be ported with a later commit. Task-number: QTBUG-92502 Change-Id: Id523d43ed3ef177010dc73afc5812ed374cff0dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/CMakeLists.txt2
-rw-r--r--src/imports/imports.pro4
-rw-r--r--src/imports/sensors/CMakeLists.txt42
-rw-r--r--src/imports/sensors/sensors.pro56
4 files changed, 44 insertions, 60 deletions
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
new file mode 100644
index 0000000..3fdc444
--- /dev/null
+++ b/src/imports/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+add_subdirectory(sensors)
diff --git a/src/imports/imports.pro b/src/imports/imports.pro
deleted file mode 100644
index a68f6a5..0000000
--- a/src/imports/imports.pro
+++ /dev/null
@@ -1,4 +0,0 @@
-TEMPLATE = subdirs
-
-SUBDIRS += sensors
-
diff --git a/src/imports/sensors/CMakeLists.txt b/src/imports/sensors/CMakeLists.txt
new file mode 100644
index 0000000..87414bd
--- /dev/null
+++ b/src/imports/sensors/CMakeLists.txt
@@ -0,0 +1,42 @@
+
+# TODO Qt 6.2 split into separate QML library + plugin
+
+qt_internal_add_qml_module(sensors
+ URI "QtSensors"
+ VERSION "${CMAKE_PROJECT_VERSION}"
+ CLASSNAME QtSensorsDeclarativeModule
+ SKIP_TYPE_REGISTRATION
+ SOURCES
+ qmlaccelerometer.cpp qmlaccelerometer.h
+ qmlaltimeter.cpp qmlaltimeter.h
+ qmlambientlightsensor.cpp qmlambientlightsensor.h
+ qmlambienttemperaturesensor.cpp qmlambienttemperaturesensor.h
+ qmlcompass.cpp qmlcompass.h
+ qmldistancesensor.cpp qmldistancesensor.h
+ qmlgyroscope.cpp qmlgyroscope.h
+ qmlholstersensor.cpp qmlholstersensor.h
+ qmlhumiditysensor.cpp qmlhumiditysensor.h
+ qmlirproximitysensor.cpp qmlirproximitysensor.h
+ qmllidsensor.cpp qmllidsensor.h
+ qmllightsensor.cpp qmllightsensor.h
+ qmlmagnetometer.cpp qmlmagnetometer.h
+ qmlorientationsensor.cpp qmlorientationsensor.h
+ qmlpressuresensor.cpp qmlpressuresensor.h
+ qmlproximitysensor.cpp qmlproximitysensor.h
+ qmlrotationsensor.cpp qmlrotationsensor.h
+ qmlsensor.cpp qmlsensor.h
+ qmlsensorgesture.cpp qmlsensorgesture.h
+ qmlsensorglobal.cpp qmlsensorglobal.h
+ qmlsensorrange.cpp qmlsensorrange.h
+ qmltapsensor.cpp qmltapsensor.h
+ qmltiltsensor.cpp qmltiltsensor.h
+ sensors.cpp
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::Sensors
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::SensorsPrivate
+)
diff --git a/src/imports/sensors/sensors.pro b/src/imports/sensors/sensors.pro
deleted file mode 100644
index 7d15ec9..0000000
--- a/src/imports/sensors/sensors.pro
+++ /dev/null
@@ -1,56 +0,0 @@
-QT += core-private qml sensors sensors-private
-
-HEADERS += \
- qmlsensor.h \
- qmlsensorrange.h \
- qmlaccelerometer.h \
- qmlaltimeter.h \
- qmlambientlightsensor.h \
- qmlambienttemperaturesensor.h \
- qmlcompass.h \
- qmldistancesensor.h \
- qmlgyroscope.h \
- qmlholstersensor.h \
- qmlirproximitysensor.h \
- qmllightsensor.h \
- qmlmagnetometer.h \
- qmlorientationsensor.h \
- qmlpressuresensor.h\
- qmlproximitysensor.h \
- qmltapsensor.h \
- qmlrotationsensor.h \
- qmlsensorglobal.h \
- qmltiltsensor.h \
- qmlsensorgesture.h \
- qmlhumiditysensor.h \
- qmllidsensor.h
-
-SOURCES += sensors.cpp \
- qmlsensor.cpp \
- qmlsensorrange.cpp \
- qmlaccelerometer.cpp \
- qmlaltimeter.cpp \
- qmlambientlightsensor.cpp \
- qmlambienttemperaturesensor.cpp \
- qmlcompass.cpp \
- qmldistancesensor.cpp \
- qmlgyroscope.cpp \
- qmlholstersensor.cpp \
- qmlirproximitysensor.cpp \
- qmllightsensor.cpp \
- qmlmagnetometer.cpp \
- qmlorientationsensor.cpp \
- qmlpressuresensor.cpp\
- qmlproximitysensor.cpp \
- qmltapsensor.cpp \
- qmlrotationsensor.cpp \
- qmlsensorglobal.cpp \
- qmltiltsensor.cpp \
- qmlsensorgesture.cpp \
- qmlhumiditysensor.cpp \
- qmllidsensor.cpp
-
-load(qml_plugin)
-
-OTHER_FILES += \
- plugin.json qmldir plugins.qmltypes