From 648eece1741f8287678a56989e4776e5009df341 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 16 Jun 2022 17:07:46 +0200 Subject: Qml: Allow major version of module to be zero If there is no QML.AddedInVersion then the component should be available from version X.0, with X being the current version of the module. Amends 464abaec05e0aa0ab699243412c50a5d5ac30742 Fixes: QTBUG-104373 Change-Id: If30b66df384fe815c41d2a0b5ca7b034b9955956 Reviewed-by: Ulf Hermann Reviewed-by: Qt CI Bot (cherry picked from commit 9225723a317b8c7e805416592b78aca0ed320049) Reviewed-by: Qt Cherry-pick Bot --- .../qml/qmltyperegistrar/VersionZero/CMakeLists.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/auto/qml/qmltyperegistrar/VersionZero/CMakeLists.txt (limited to 'tests/auto/qml/qmltyperegistrar/VersionZero/CMakeLists.txt') diff --git a/tests/auto/qml/qmltyperegistrar/VersionZero/CMakeLists.txt b/tests/auto/qml/qmltyperegistrar/VersionZero/CMakeLists.txt new file mode 100644 index 0000000000..09b9cea69a --- /dev/null +++ b/tests/auto/qml/qmltyperegistrar/VersionZero/CMakeLists.txt @@ -0,0 +1,20 @@ +qt_add_library(tst_qmltyperegistrar_major_version_zero) +qt_autogen_tools_initial_setup(tst_qmltyperegistrar_major_version_zero) +target_link_libraries(tst_qmltyperegistrar_major_version_zero PRIVATE Qt::Core Qt::Qml) +qt_enable_autogen_tool(tst_qmltyperegistrar_major_version_zero "moc" ON) +qt_add_qml_module(tst_qmltyperegistrar_major_version_zero + URI VersionZero + VERSION 0.1 + SOURCES + version_zero_type.h +) +qt_autogen_tools_initial_setup(tst_qmltyperegistrar_major_version_zero) + +# Make sure the backing library is found on Windows next to the executable +set_target_properties( + tst_qmltyperegistrar_major_version_zero + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.. + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.. + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/.. +) -- cgit v1.2.3