summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qfactoryloader
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-10-16 14:25:14 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-10-21 11:17:20 +0000
commitf8c1909320313c8a9c03661d8fe77728bde6556a (patch)
treed3f9d392a264448d8a00c358490cad2718c49709 /tests/auto/corelib/plugin/qfactoryloader
parent51979657a128c19ff8ce52eda345b256ba62de80 (diff)
Convert corelib plugin tests
Change-Id: Ia98f7945a2c5b09a9b4d59e430cf05a7fecb7d55 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/corelib/plugin/qfactoryloader')
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt5
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt33
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt33
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt66
4 files changed, 137 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
new file mode 100644
index 0000000000..6263be15a2
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/CMakeLists.txt
@@ -0,0 +1,5 @@
+# Generated from qfactoryloader.pro.
+
+add_subdirectory(plugin1)
+add_subdirectory(plugin2)
+add_subdirectory(test)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
new file mode 100644
index 0000000000..56a126c78b
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from plugin1.pro.
+
+#####################################################################
+## plugin1 Plugin:
+#####################################################################
+
+add_qt_plugin(plugin1
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qfactoryloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ plugin1.cpp plugin1.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:plugin1.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 7:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+extend_target(plugin1 CONDITION NOT QT_FEATURE_library
+ DEFINES
+ QT_STATICPLUGIN
+)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
new file mode 100644
index 0000000000..5b6e9062cc
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from plugin2.pro.
+
+#####################################################################
+## plugin2 Plugin:
+#####################################################################
+
+add_qt_plugin(plugin2
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qfactoryloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ plugin2.cpp plugin2.h
+ PUBLIC_LIBRARIES
+ Qt::Core
+)
+
+#### Keys ignored in scope 1:.:.:plugin2.pro:<TRUE>:
+# INSTALLS = "target"
+# TEMPLATE = "lib"
+# target.path = "$$[QT_INSTALL_TESTS]/tst_qfactoryloader/bin"
+
+## Scopes:
+#####################################################################
+
+#### Keys ignored in scope 6:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug):
+# DESTDIR = "../debug/bin"
+
+#### Keys ignored in scope 7:.:..:../winrt.pri:else:
+# DESTDIR = "../release/bin"
+
+extend_target(plugin2 CONDITION NOT QT_FEATURE_library
+ DEFINES
+ QT_STATICPLUGIN
+)
diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
new file mode 100644
index 0000000000..7d81342b4a
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt
@@ -0,0 +1,66 @@
+# Generated from test.pro.
+
+#####################################################################
+## tst_qfactoryloader Test:
+#####################################################################
+
+add_qt_test(tst_qfactoryloader
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case
+ SOURCES
+ ../plugin1/plugininterface1.h
+ ../plugin2/plugininterface2.h
+ ../tst_qfactoryloader.cpp
+ LIBRARIES
+ Qt::CorePrivate
+)
+
+## Scopes:
+#####################################################################
+
+# special case begin
+if (NOT QT_FEATURE_library)
+ target_link_directories(tst_qfactoryloader PRIVATE "${CMAKE_CURRENT_BINARY_DIR}../bin")
+endif()
+# special case end
+
+extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library
+ PUBLIC_LIBRARIES
+ # Remove: L
+ # special case begin
+ # this part is handled as a special case above
+ # ../bin/
+ # special case end
+ plugin1
+ plugin2
+)
+
+if(ANDROID)
+ # special case begin
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/../bin/libplugin1.so
+ PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY plugin1
+ )
+
+ set_source_files_properties(
+ ${CMAKE_CURRENT_BINARY_DIR}/../bin/libplugin2.so
+ PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY plugin2
+ )
+ # special case end
+ # Resources:
+ set(qmake_libs_resource_files
+ # special case begin
+ bin/libplugin1.so
+ bin/libplugin2.so
+ #${CMAKE_CURRENT_BINARY_DIR}/../bin
+ # special case end
+ )
+
+ add_qt_resource(tst_qfactoryloader "qmake_libs"
+ PREFIX
+ "android_test_data"
+ BASE
+ "${CMAKE_CURRENT_BINARY_DIR}/.."
+ FILES
+ ${qmake_libs_resource_files}
+ )
+endif()