summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-06-01 16:09:58 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-06-05 09:06:04 +0200
commit12e52076172e12b4391bc36d5e34efdeb9e71f49 (patch)
tree6f4ad2e95f2f575a77f1c4997f09516dae52eb41
parent05f58c9d1903acdea30d0378257fe506a4159edd (diff)
CMake: Update to latest qml CMake API
Task-number: QTBUG-91621 Change-Id: I35ef90f6df40fac3808fb19054c66d73b18137c8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--examples/remoteobjects/plugins/CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/imports/CMakeLists.txt2
-rw-r--r--src/imports/remoteobjects/CMakeLists.txt27
-rw-r--r--src/imports/remoteobjects/plugin.cpp62
-rw-r--r--src/remoteobjectsqml/CMakeLists.txt19
-rw-r--r--src/remoteobjectsqml/qremoteobjectsqml_p.h (renamed from src/imports/remoteobjects/qremoteobjectsqml_p.h)0
-rw-r--r--sync.profile1
8 files changed, 21 insertions, 93 deletions
diff --git a/examples/remoteobjects/plugins/CMakeLists.txt b/examples/remoteobjects/plugins/CMakeLists.txt
index abcefee..82b3f99 100644
--- a/examples/remoteobjects/plugins/CMakeLists.txt
+++ b/examples/remoteobjects/plugins/CMakeLists.txt
@@ -24,7 +24,6 @@ qt6_add_qml_module(qmlqrotimeexampleplugin
OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/imports/TimeExample"
VERSION 1.0
URI "TimeExample"
- INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}
)
target_sources(qmlqrotimeexampleplugin PRIVATE
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ce8d0cf..22babd4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,5 +4,5 @@ if(QT_FEATURE_localserver)
add_subdirectory(remoteobjects)
endif()
if(TARGET Qt::Quick)
- add_subdirectory(imports)
+ add_subdirectory(remoteobjectsqml)
endif()
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
deleted file mode 100644
index b9db9e3..0000000
--- a/src/imports/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-
-add_subdirectory(remoteobjects)
diff --git a/src/imports/remoteobjects/CMakeLists.txt b/src/imports/remoteobjects/CMakeLists.txt
deleted file mode 100644
index bc89f8a..0000000
--- a/src/imports/remoteobjects/CMakeLists.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#####################################################################
-## qtremoteobjects Plugin:
-#####################################################################
-
-qt_internal_add_qml_module(declarative_remoteobjects
- URI "QtRemoteObjects"
- VERSION "${CMAKE_PROJECT_VERSION_MAJOR}.${CMAKE_PROJECT_VERSION_MINOR}"
- CLASSNAME QtRemoteObjectsPlugin
- SKIP_TYPE_REGISTRATION
- GENERATE_QMLTYPES
- INSTALL_QMLTYPES
- SOURCES
- qremoteobjectsqml_p.h
- plugin.cpp
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::QmlPrivate
- Qt::RemoteObjects
-)
-
-#### Keys ignored in scope 1:.:.:remoteobjects.pro:<TRUE>:
-# CXX_MODULE = "qml"
-# IMPORT_VERSION = "5.$$QT_MINOR_VERSION"
-# TARGETPATH = "QtRemoteObjects"
diff --git a/src/imports/remoteobjects/plugin.cpp b/src/imports/remoteobjects/plugin.cpp
deleted file mode 100644
index b9b72ed..0000000
--- a/src/imports/remoteobjects/plugin.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017-2015 Ford Motor Company
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtRemoteObjects module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qremoteobjectsqml_p.h"
-#include <QtQml/qqmlextensionplugin.h>
-
-extern void qml_register_types_QtRemoteObjects();
-
-QT_BEGIN_NAMESPACE
-
-class QtRemoteObjectsPlugin : public QQmlEngineExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
-
-public:
- QtRemoteObjectsPlugin(QObject *parent = nullptr) : QQmlEngineExtensionPlugin(parent)
- {
- volatile auto registration = &qml_register_types_QtRemoteObjects;
- Q_UNUSED(registration)
- }
-};
-
-QT_END_NAMESPACE
-
-#include "plugin.moc"
diff --git a/src/remoteobjectsqml/CMakeLists.txt b/src/remoteobjectsqml/CMakeLists.txt
new file mode 100644
index 0000000..7b49f62
--- /dev/null
+++ b/src/remoteobjectsqml/CMakeLists.txt
@@ -0,0 +1,19 @@
+
+#####################################################################
+## qtremoteobjects Plugin:
+#####################################################################
+
+qt_internal_add_qml_module(RemoteObjectsQml
+ URI "QtRemoteObjects"
+ VERSION "${PROJECT_VERSION}"
+ PLUGIN_TARGET declarative_remoteobjects
+ CLASS_NAME QtRemoteObjectsPlugin
+ SOURCES
+ qremoteobjectsqml_p.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::QmlPrivate
+ Qt::RemoteObjects
+)
diff --git a/src/imports/remoteobjects/qremoteobjectsqml_p.h b/src/remoteobjectsqml/qremoteobjectsqml_p.h
index 46c22d0..46c22d0 100644
--- a/src/imports/remoteobjects/qremoteobjectsqml_p.h
+++ b/src/remoteobjectsqml/qremoteobjectsqml_p.h
diff --git a/sync.profile b/sync.profile
index ace6565..2a12d4c 100644
--- a/sync.profile
+++ b/sync.profile
@@ -1,4 +1,5 @@
%modules = ( # path to module name map
"QtRemoteObjects" => "$basedir/src/remoteobjects",
+ "QtRemoteObjectsQml" => "$basedir/src/remoteobjectsqml",
"QtRepParser" => "$basedir/src/repparser",
);