diff options
Diffstat (limited to 'tests/auto/corelib/plugin/qfactoryloader')
5 files changed, 187 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..940dcc2b09 --- /dev/null +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/CMakeLists.txt @@ -0,0 +1,36 @@ +# Generated from plugin1.pro. + +##################################################################### +## plugin1 Generic Library: +##################################################################### + +add_cmake_library(plugin1 + MODULE + 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 +) + +qt_autogen_tools_initial_setup(plugin1) 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..2df999c292 --- /dev/null +++ b/tests/auto/corelib/plugin/qfactoryloader/plugin2/CMakeLists.txt @@ -0,0 +1,36 @@ +# Generated from plugin2.pro. + +##################################################################### +## plugin2 Generic Library: +##################################################################### + +add_cmake_library(plugin2 + MODULE + 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 +) + +qt_autogen_tools_initial_setup(plugin2) diff --git a/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt new file mode 100644 index 0000000000..b388bb65cf --- /dev/null +++ b/tests/auto/corelib/plugin/qfactoryloader/test/.prev_CMakeLists.txt @@ -0,0 +1,42 @@ +# Generated from test.pro. + +##################################################################### +## tst_qfactoryloader Test: +##################################################################### + +add_qt_test(tst_qfactoryloader + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../plugin1/plugininterface1.h + ../plugin2/plugininterface2.h + ../tst_qfactoryloader.cpp + LIBRARIES + Qt::CorePrivate +) + +## Scopes: +##################################################################### + +extend_target(tst_qfactoryloader CONDITION NOT QT_FEATURE_library + PUBLIC_LIBRARIES + # Remove: L + ../bin/ + plugin1 + plugin2 +) + +if(ANDROID) + # Resources: + set(qmake_libs_resource_files + ${CMAKE_CURRENT_BINARY_DIR}/../bin + ) + + add_qt_resource(tst_qfactoryloader "qmake_libs" + PREFIX + "android_test_data" + BASE + "${CMAKE_CURRENT_BINARY_DIR}/.." + FILES + ${qmake_libs_resource_files} + ) +endif() 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..509a88da0c --- /dev/null +++ b/tests/auto/corelib/plugin/qfactoryloader/test/CMakeLists.txt @@ -0,0 +1,68 @@ +# Generated from test.pro. + +##################################################################### +## tst_qfactoryloader Test: +##################################################################### + +add_qt_test(tst_qfactoryloader + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + 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 +) + +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 + ) + # Resources: + if (ANDROID) + set(qmake_libs_resource_files + bin/libplugin1_${CMAKE_ANDROID_ARCH_ABI}.so + bin/libplugin2_${CMAKE_ANDROID_ARCH_ABI}.so + ) + else() + set(qmake_libs_resource_files + bin/libplugin1.so + bin/libplugin2.so + ) + endif() + # 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() |