summaryrefslogtreecommitdiffstats
path: root/src/sensorsquick/CMakeLists.txt
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-05-21 10:01:56 +0300
committerJuha Vuolle <juha.vuolle@insta.fi>2021-05-26 09:48:04 +0300
commit0193d164e79845f7a2b5a388ed2818854c77399f (patch)
tree68d05a426a53d39c0bce34705dd91fbbbc9c24e5 /src/sensorsquick/CMakeLists.txt
parentcf21f9074be72e9d5a1c45638bf6762edad7a73f (diff)
Split the Sensors QML plugin into a library and a plugin
The main changes: - Introduction of new SensorsQuick library with private exports - The original QML plugin loads this new library and does little else - Renamed original 'sensors' plugin as 'declarative_sensors' to provide an idea what it relates to - Renamed library headers as private "_p.h" and added "We mean it" - Changed qmlRegister* calls to QML_ELEMENT macros - Removed files that are generated in Qt6 (qmldir, plugins.qmltypes) Task-number: QTBUG-92530 Change-Id: I18f849adabcc79ac47e67305f78aefeee82801bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/sensorsquick/CMakeLists.txt')
-rw-r--r--src/sensorsquick/CMakeLists.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/sensorsquick/CMakeLists.txt b/src/sensorsquick/CMakeLists.txt
new file mode 100644
index 00000000..703974e1
--- /dev/null
+++ b/src/sensorsquick/CMakeLists.txt
@@ -0,0 +1,45 @@
+qt_internal_add_module(SensorsQuick
+ SOURCES
+ qmlaccelerometer.cpp qmlaccelerometer_p.h
+ qmlaltimeter.cpp qmlaltimeter_p.h
+ qmlambientlightsensor.cpp qmlambientlightsensor_p.h
+ qmlambienttemperaturesensor.cpp qmlambienttemperaturesensor_p.h
+ qmlcompass.cpp qmlcompass_p.h
+ qmldistancesensor.cpp qmldistancesensor_p.h
+ qmlgyroscope.cpp qmlgyroscope_p.h
+ qmlholstersensor.cpp qmlholstersensor_p.h
+ qmlhumiditysensor.cpp qmlhumiditysensor_p.h
+ qmlirproximitysensor.cpp qmlirproximitysensor_p.h
+ qmllidsensor.cpp qmllidsensor_p.h
+ qmllightsensor.cpp qmllightsensor_p.h
+ qmlmagnetometer.cpp qmlmagnetometer_p.h
+ qmlorientationsensor.cpp qmlorientationsensor_p.h
+ qmlpressuresensor.cpp qmlpressuresensor_p.h
+ qmlproximitysensor.cpp qmlproximitysensor_p.h
+ qmlrotationsensor.cpp qmlrotationsensor_p.h
+ qmlsensor.cpp qmlsensor_p.h
+ qmlsensorgesture.cpp qmlsensorgesture_p.h
+ qmlsensorglobal.cpp qmlsensorglobal_p.h
+ qmlsensorrange.cpp qmlsensorrange_p.h
+ qmltapsensor.cpp qmltapsensor_p.h
+ qmltiltsensor.cpp qmltiltsensor_p.h
+ qsensorsquickglobal_p.h
+ DEFINES
+ QT_BUILD_SENSORSQUICK_LIB
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Qml
+ Qt::Sensors
+ LIBRARIES
+ Qt::CorePrivate
+)
+
+set_target_properties(SensorsQuick PROPERTIES
+ QT_QML_MODULE_INSTALL_QMLTYPES TRUE
+ QT_QML_MODULE_VERSION ${PROJECT_VERSION}
+ QT_QML_MODULE_URI QtSensors
+ QT_QMLTYPES_FILENAME plugins.qmltypes
+ QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtSensors"
+)
+
+qt6_qml_type_registration(SensorsQuick)