summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2019-09-17 11:43:34 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2019-09-23 11:45:12 +0000
commit902dfced06b73b92ae6cb9adc7a51acff0bcc936 (patch)
tree891ec1cabccf906bf9527b1a8278228185af596a /src
parentd87b0adb32e7ed1d897670b59d7ebbb7c504c75c (diff)
downloadqtwebchannel-902dfced06b73b92ae6cb9adc7a51acff0bcc936.tar.gz
Add cmake support
Fixes: QTBUG-78190 Change-Id: Ibdfbcb479ce1af6370b9148516cef6f64e7c1abb Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/imports/CMakeLists.txt3
-rw-r--r--src/imports/webchannel/CMakeLists.txt26
-rw-r--r--src/imports/webchannel/webchannel.pro1
-rw-r--r--src/webchannel/CMakeLists.txt64
-rw-r--r--src/webchannel/webchannel.pro3
6 files changed, 103 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..a80a886
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Generated from src.pro.
+
+add_subdirectory(webchannel)
+if(TARGET Qt::Quick)
+ add_subdirectory(imports)
+endif()
diff --git a/src/imports/CMakeLists.txt b/src/imports/CMakeLists.txt
new file mode 100644
index 0000000..6c0c9ae
--- /dev/null
+++ b/src/imports/CMakeLists.txt
@@ -0,0 +1,3 @@
+# Generated from imports.pro.
+
+add_subdirectory(webchannel)
diff --git a/src/imports/webchannel/CMakeLists.txt b/src/imports/webchannel/CMakeLists.txt
new file mode 100644
index 0000000..fa48b81
--- /dev/null
+++ b/src/imports/webchannel/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from webchannel.pro.
+
+#####################################################################
+## webchannel Plugin:
+#####################################################################
+
+add_qml_module(declarative_webchannel # special case
+ URI "QtWebChannel"
+ VERSION "1.${CMAKE_PROJECT_VERSION_MINOR}"
+ CLASSNAME QWebChannelPlugin
+ SOURCES
+ plugin.cpp
+ INCLUDE_DIRECTORIES
+ ../../webchannel
+ LIBRARIES
+ Qt::WebChannelPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Quick
+ Qt::WebChannel
+)
+
+#### Keys ignored in scope 1:.:.:webchannel.pro:<TRUE>:
+# IMPORT_VERSION = "1.$$QT_MINOR_VERSION"
+# TARGETPATH = "QtWebChannel"
+# _LOADED = "qml_plugin"
diff --git a/src/imports/webchannel/webchannel.pro b/src/imports/webchannel/webchannel.pro
index fd69605..2141cd8 100644
--- a/src/imports/webchannel/webchannel.pro
+++ b/src/imports/webchannel/webchannel.pro
@@ -4,6 +4,7 @@ INCLUDEPATH += ../../webchannel
VPATH += ../../webchannel
IMPORT_VERSION = 1.$$QT_MINOR_VERSION
+TARGETPATH = QtWebChannel
SOURCES += \
plugin.cpp
diff --git a/src/webchannel/CMakeLists.txt b/src/webchannel/CMakeLists.txt
new file mode 100644
index 0000000..4f7f940
--- /dev/null
+++ b/src/webchannel/CMakeLists.txt
@@ -0,0 +1,64 @@
+# Generated from webchannel.pro.
+
+#####################################################################
+## WebChannel Module:
+#####################################################################
+
+add_qt_module(WebChannel
+ SOURCES
+ qmetaobjectpublisher.cpp qmetaobjectpublisher_p.h
+ qwebchannel.cpp qwebchannel.h qwebchannel_p.h
+ qwebchannelabstracttransport.cpp qwebchannelabstracttransport.h
+ signalhandler_p.h
+ variantargument_p.h
+ LIBRARIES
+ Qt::CorePrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+# Resources:
+set_source_files_properties("../../examples/webchannel/shared/qwebchannel.js"
+ PROPERTIES QT_RESOURCE_ALIAS "qwebchannel.js"
+)
+set(resources_resource_files
+ "../../examples/webchannel/shared/qwebchannel.js"
+)
+
+set_source_files_properties(${resources_resource_files} PROPERTIES QT_SKIP_QUICKCOMPILER 1)
+
+add_qt_resource(WebChannel "resources"
+ PREFIX
+ "/qtwebchannel/"
+ FILES
+ ${resources_resource_files}
+)
+
+
+#### Keys ignored in scope 1:.:.:webchannel.pro:<TRUE>:
+# OTHER_FILES = "qwebchannel.js"
+# _LOADED = "qt_module"
+
+## Scopes:
+#####################################################################
+
+extend_target(WebChannel CONDITION TARGET Qt::Qml
+ SOURCES
+ qqmlwebchannel.cpp
+ qqmlwebchannelattached.cpp
+ PUBLIC_LIBRARIES
+ Qt::Qml
+)
+
+#### Keys ignored in scope 2:.:.:webchannel.pro:TARGET Qt::Qml:
+# PRIVATE_HEADERS = "qqmlwebchannelattached_p.h"
+# PUBLIC_HEADERS = "qqmlwebchannel.h"
+
+extend_target(WebChannel CONDITION NOT TARGET Qt::Qml
+ DEFINES
+ QT_NO_JSVALUE
+)
+add_qt_docs(
+ doc/qtwebchannel.qdocconf
+)
+
diff --git a/src/webchannel/webchannel.pro b/src/webchannel/webchannel.pro
index 9c555e7..00e75f5 100644
--- a/src/webchannel/webchannel.pro
+++ b/src/webchannel/webchannel.pro
@@ -7,6 +7,9 @@ QMAKE_DOCS = $$PWD/doc/qtwebchannel.qdocconf
RESOURCES += \
resources.qrc
+QTQUICK_COMPILER_SKIPPED_RESOURCES += \
+ resources.qrc
+
OTHER_FILES = \
qwebchannel.js