summaryrefslogtreecommitdiff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/CMakeLists.txt13
-rw-r--r--tests/auto/CMakeLists.txt10
-rw-r--r--tests/auto/qml/CMakeLists.txt38
-rw-r--r--tests/auto/webchannel/CMakeLists.txt28
4 files changed, 89 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..6755718
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,13 @@
+# Generated from tests.pro.
+
+# special case begin
+if(NOT TARGET Qt::Test)
+ cmake_minimum_required(VERSION 3.15.0)
+ project(QtWebChannelTests VERSION 6.0.0 LANGUAGES C CXX)
+ find_package(Qt6 ${PROJECT_VERSION} REQUIRED COMPONENTS BuildInternals Core Test WebChannel)
+ find_package(Qt6 ${PROJECT_VERSION} OPTIONAL_COMPONENTS Quick QuickTest)
+ qt_set_up_standalone_tests_build()
+endif()
+# special case end
+
+qt_build_tests()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
new file mode 100644
index 0000000..716f70c
--- /dev/null
+++ b/tests/auto/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Generated from auto.pro.
+
+# special case begin
+# Qt5 cmake tests
+#add_subdirectory(cmake)
+# special case end
+add_subdirectory(webchannel)
+if(TARGET Qt::Quick)
+ add_subdirectory(qml)
+endif()
diff --git a/tests/auto/qml/CMakeLists.txt b/tests/auto/qml/CMakeLists.txt
new file mode 100644
index 0000000..e49bd8c
--- /dev/null
+++ b/tests/auto/qml/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from qml.pro.
+
+#####################################################################
+## qml Test:
+#####################################################################
+
+# Collect test data
+
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ "data/*")
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(qml
+ GUI
+ QMLTEST
+ QML_IMPORTPATH
+ "${CMAKE_CURRENT_BINARY_DIR}/../../../qml"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ SOURCES
+ qml.cpp
+ testobject.cpp testobject.h
+ testtransport.cpp testtransport.h
+ testwebchannel.cpp testwebchannel.h
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::WebChannelPrivate
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::WebChannel
+ TESTDATA ${test_data}
+)
+
+#### Keys ignored in scope 1:.:.:qml.pro:<TRUE>:
+# DISTFILES = "tst_webchannelseparation.qml"
+# IMPORTPATH = "$$OUT_PWD/../../../qml" "$$PWD"
+# OTHER_FILES = "Client.qml" "WebChannelTest.qml" "tst_webchannel.qml" "tst_metaobjectpublisher.qml" "tst_bench.qml" "tst_multiclient.qml"
+# TEMPLATE = "app"
diff --git a/tests/auto/webchannel/CMakeLists.txt b/tests/auto/webchannel/CMakeLists.txt
new file mode 100644
index 0000000..aa040f8
--- /dev/null
+++ b/tests/auto/webchannel/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Generated from webchannel.pro.
+
+#####################################################################
+## tst_webchannel Test:
+#####################################################################
+
+add_qt_test(tst_webchannel
+ GUI
+ SOURCES
+ tst_webchannel.cpp tst_webchannel.h
+ INCLUDE_DIRECTORIES
+ ../../../src/webchannel
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::WebChannelPrivate
+ PUBLIC_LIBRARIES
+ Qt::WebChannel
+)
+
+## Scopes:
+#####################################################################
+
+extend_target(tst_webchannel CONDITION TARGET Qt::Qml
+ DEFINES
+ WEBCHANNEL_TESTS_CAN_USE_JS_ENGINE
+ PUBLIC_LIBRARIES
+ Qt::Qml
+)