diff options
Diffstat (limited to 'tests/auto/corelib/plugin')
32 files changed, 953 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/CMakeLists.txt b/tests/auto/corelib/plugin/CMakeLists.txt new file mode 100644 index 0000000000..710d471e8a --- /dev/null +++ b/tests/auto/corelib/plugin/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from plugin.pro. + +if(QT_BUILD_SHARED_LIBS) + add_subdirectory(qfactoryloader) +endif() +add_subdirectory(quuid) +if(QT_FEATURE_library) + add_subdirectory(qpluginloader) + add_subdirectory(qlibrary) +endif() +if(QT_BUILD_SHARED_LIBS AND QT_FEATURE_library) + add_subdirectory(qplugin) +endif() 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() diff --git a/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt new file mode 100644 index 0000000000..c0faebc91d --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/CMakeLists.txt @@ -0,0 +1,5 @@ +# Generated from qlibrary.pro. + +add_subdirectory(lib) +add_subdirectory(lib2) +add_subdirectory(tst) diff --git a/tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt new file mode 100644 index 0000000000..6dbbd7a060 --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/lib/.prev_CMakeLists.txt @@ -0,0 +1,34 @@ +# Generated from lib.pro. + +##################################################################### +## mylib Generic Library: +##################################################################### + +add_cmake_library(mylib + SHARED + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qlibrary" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + mylib.c + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qlibrary" + +## Scopes: +##################################################################### + +extend_target(mylib CONDITION MSVC + DEFINES + WIN32_MSVC +) + +#### Keys ignored in scope 4:.:.:lib.pro:(CMAKE_BUILD_TYPE STREQUAL Debug): +# DESTDIR = "../debug/" + +#### Keys ignored in scope 5:.:.:lib.pro:else: +# DESTDIR = "../release/" diff --git a/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt new file mode 100644 index 0000000000..f2de91635a --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/lib/CMakeLists.txt @@ -0,0 +1,43 @@ +# Generated from lib.pro. + +##################################################################### +## mylib Generic Library: +##################################################################### + +add_cmake_library(mylib + SHARED + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qlibrary" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + mylib.c + PUBLIC_LIBRARIES + Qt::Core +) + +# special case begin +set_target_properties(mylib PROPERTIES + VERSION 1.0.0 + SOVERSION 1 + C_VISIBILITY_PRESET "default" + CXX_VISIBILITY_PRESET "default" +) +# special case end + +#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qlibrary" + +## Scopes: +##################################################################### + +extend_target(mylib CONDITION MSVC + DEFINES + WIN32_MSVC +) + +#### Keys ignored in scope 4:.:.:lib.pro:(CMAKE_BUILD_TYPE STREQUAL Debug): +# DESTDIR = "../debug/" + +#### Keys ignored in scope 5:.:.:lib.pro:else: +# DESTDIR = "../release/" diff --git a/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt new file mode 100644 index 0000000000..716ad488d0 --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/lib2/CMakeLists.txt @@ -0,0 +1,104 @@ +# Generated from lib2.pro. + +##################################################################### +## mylib Generic Library: +##################################################################### + +add_cmake_library(mylib2 # special case + SHARED + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}tst_qlibrary" + #OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case + SOURCES + mylib.c + PUBLIC_LIBRARIES + Qt::Core +) + +# special case begin +# This test is very "annoying" to get working with CMake as it involves having +# two targets with the same name on the parent scope, which is not possible with +# CMake. Furthermore, on UNIX, this version of the library should override the +# root symlink (libmylib.so) to point to version 2. +# Since we can't build two targets with the same name and in the same directory, +# we build mylib2 in it's own directory and manually copy and create the +# symlinks in the parent directory. +# Finally we also need to create a libmylib.so2 file in the parent directory. +# +set_target_properties(mylib2 PROPERTIES + OUTPUT_NAME mylib +) +set_target_properties(mylib2 PROPERTIES + VERSION 2.0.0 + SOVERSION 2 + C_VISIBILITY_PRESET "default" + CXX_VISIBILITY_PRESET "default" +) +if (UNIX) + add_dependencies(mylib2 mylib) + add_custom_command(TARGET mylib2 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $<TARGET_FILE:mylib2> + "${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $<TARGET_FILE:mylib2> + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0" + COMMAND ${CMAKE_COMMAND} -E create_symlink + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0" + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2" + COMMAND ${CMAKE_COMMAND} -E remove + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so" + COMMAND ${CMAKE_COMMAND} -E create_symlink + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0" + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so" + COMMAND ${CMAKE_COMMAND} -E create_symlink + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so.2.0.0" + "${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2" + ) +else() #Win32 + add_custom_command(TARGET mylib2 POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $<TARGET_FILE:mylib2> + "${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.dll" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $<TARGET_FILE:mylib2> + "${CMAKE_CURRENT_BINARY_DIR}/../mylib.dl2" + ) +endif() +# special case end + +#### Keys ignored in scope 1:.:.:lib2.pro:<TRUE>: +# INSTALLS = "target" "renamed_target" +# QMAKE_POST_LINK = "$$member(QMAKE_POST_LINK, 0, -2)" +# TEMPLATE = "lib" +# VERSION = "2" +# renamed_target.extra = "$$member(renamed_target.extra, 0, -2)" +# renamed_target.path = "$$target.path" +# target.path = "$$[QT_INSTALL_TESTS]$${QMAKE_DIR_SEP}tst_qlibrary" + +## Scopes: +##################################################################### + +extend_target(mylib2 CONDITION MSVC # special case + DEFINES + WIN32_MSVC +) + +#### Keys ignored in scope 3:.:.:lib2.pro:WIN32: +# DESTDIR = "../$$BUILD_FOLDER/" +# files = "$$BUILD_FOLDER$${QMAKE_DIR_SEP}mylib.dl2" "$$BUILD_FOLDER$${QMAKE_DIR_SEP}system.qt.test.mylib.dll" + +#### Keys ignored in scope 4:.:.:lib2.pro:(CMAKE_BUILD_TYPE STREQUAL Debug): +# BUILD_FOLDER = "debug" + +#### Keys ignored in scope 5:.:.:lib2.pro:else: +# BUILD_FOLDER = "release" + +#### Keys ignored in scope 6:.:.:lib2.pro:TEMPLATE___contains___vc._x_: +# src = "$(TargetPath)" + +#### Keys ignored in scope 7:.:.:lib2.pro:else: +# src = "$(DESTDIR_TARGET)" + +#### Keys ignored in scope 8:.:.:lib2.pro:else: +# files = "libmylib.so2" "system.qt.test.mylib.so" +# src = "$(DESTDIR)$(TARGET)" diff --git a/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt new file mode 100644 index 0000000000..ac6515ba63 --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt @@ -0,0 +1,37 @@ +# Generated from tst.pro. + +##################################################################### +## tst_qlibrary Test: +##################################################################### + +# Collect test data +list(APPEND test_data "../library_path/invalid.so") + +add_qt_test(tst_qlibrary + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../tst_qlibrary.cpp + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +if(ANDROID) + # Resources: + set(qmake_libs_resource_files + ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.prl + ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so + ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2 + ${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so + ) + + add_qt_resource(tst_qlibrary "qmake_libs" + PREFIX + "android_test_data" + BASE + "${CMAKE_CURRENT_BINARY_DIR}/.." + FILES + ${qmake_libs_resource_files} + ) +endif() diff --git a/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt new file mode 100644 index 0000000000..e6086a982f --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/tst/CMakeLists.txt @@ -0,0 +1,50 @@ +# Generated from tst.pro. + +##################################################################### +## tst_qlibrary Test: +##################################################################### + +# Collect test data +list(APPEND test_data "../library_path/invalid.so") + +add_qt_test(tst_qlibrary + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../tst_qlibrary.cpp + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +if(ANDROID) + # special case begin + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so + PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY mylib + ) + set_source_files_properties( + ${CMAKE_CURRENT_BINARY_DIR}/../libmylib.so2 + ${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so + PROPERTIES QT_RESOURCE_TARGET_DEPENDENCY mylib2 + ) + # special case end + # Resources: + set(qmake_libs_resource_files + # special case begin + #libmylib.prl + libmylib.so + libmylib.so2 + system.qt.test.mylib.so + # special case end + ) + + add_qt_resource(tst_qlibrary "qmake_libs" + PREFIX + "android_test_data" + BASE + "${CMAKE_CURRENT_BINARY_DIR}/.." + FILES + ${qmake_libs_resource_files} + ) +endif() diff --git a/tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt new file mode 100644 index 0000000000..7e6ccc966d --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/.prev_CMakeLists.txt @@ -0,0 +1,3 @@ +# Generated from qplugin.pro. + +add_subdirectory(invalidplugin) diff --git a/tests/auto/corelib/plugin/qplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt new file mode 100644 index 0000000000..efc810075a --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/CMakeLists.txt @@ -0,0 +1,25 @@ +# Generated from qplugin.pro. + +add_subdirectory(invalidplugin) + +# special case begin +add_subdirectory(debugplugin) +add_subdirectory(releaseplugin) + +# The contents below are generated from ./tst_qplugin.pro +# Collect test data +file(GLOB_RECURSE test_data_glob + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + plugins/*) +list(APPEND test_data ${test_data_glob}) + +add_qt_test(tst_qplugin + SOURCES + tst_qplugin.cpp + LIBRARIES + Qt::CorePrivate + TESTDATA ${test_data} +) + +add_dependencies(tst_qplugin invalidplugin debugplugin releaseplugin) +# special case end diff --git a/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt new file mode 100644 index 0000000000..ab32e5e364 --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from debugplugin.pro. + +##################################################################### +## debugplugin Generic Library: +##################################################################### + +add_cmake_library(debugplugin + MODULE + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:debugplugin.pro:<TRUE>: +# TEMPLATE = "lib" + +qt_autogen_tools_initial_setup(debugplugin) diff --git a/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt new file mode 100644 index 0000000000..c3eb37d930 --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from invalidplugin.pro. + +##################################################################### +## invalidplugin Generic Library: +##################################################################### + +add_cmake_library(invalidplugin + MODULE + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:invalidplugin.pro:<TRUE>: +# TEMPLATE = "lib" + +qt_autogen_tools_initial_setup(invalidplugin) diff --git a/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt new file mode 100644 index 0000000000..893386bc6b --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt @@ -0,0 +1,19 @@ +# Generated from releaseplugin.pro. + +##################################################################### +## releaseplugin Generic Library: +##################################################################### + +add_cmake_library(releaseplugin + MODULE + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:releaseplugin.pro:<TRUE>: +# TEMPLATE = "lib" + +qt_autogen_tools_initial_setup(releaseplugin) diff --git a/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt new file mode 100644 index 0000000000..ba7d375e3b --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from qpluginloader.pro. + +add_subdirectory(lib) +add_subdirectory(staticplugin) +add_subdirectory(theplugin) +add_subdirectory(tst) +if(UNIX AND NOT ANDROID AND NOT APPLE) + add_subdirectory(almostplugin) +endif() +if(APPLE_OSX AND QT_FEATURE_private_tests AND TARGET Qt::Gui) + add_subdirectory(machtest) +endif() diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt new file mode 100644 index 0000000000..5e42a1aef0 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/.prev_CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from almostplugin.pro. + +##################################################################### +## almostplugin Generic Library: +##################################################################### + +add_cmake_library(almostplugin + MODULE + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin" + SOURCES + almostplugin.cpp almostplugin.h + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:almostplugin.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin" + +## Scopes: +##################################################################### + +extend_target(almostplugin CONDITION GCC + LINK_OPTIONS + "--Wl,--no-undefined" +) + +qt_autogen_tools_initial_setup(almostplugin) diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt new file mode 100644 index 0000000000..5208a70c9d --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt @@ -0,0 +1,32 @@ +# Generated from almostplugin.pro. + +##################################################################### +## almostplugin Generic Library: +##################################################################### + +add_cmake_library(almostplugin + MODULE + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin" + SOURCES + almostplugin.cpp almostplugin.h + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:almostplugin.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin" + +## Scopes: +##################################################################### + +qt_autogen_tools_initial_setup(almostplugin) +# special case begin +# We want the opposite of this +#extend_target(almostplugin CONDITION GCC +# LINK_OPTIONS +# "--Wl,--no-undefined" +#) +# special case end diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt new file mode 100644 index 0000000000..74945fc6d8 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/lib/.prev_CMakeLists.txt @@ -0,0 +1,34 @@ +# Generated from lib.pro. + +##################################################################### +## tst_qpluginloaderlib Generic Library: +##################################################################### + +add_cmake_library(tst_qpluginloaderlib + SHARED + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin" + SOURCES + mylib.c + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/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(tst_qpluginloaderlib CONDITION MSVC + DEFINES + WIN32_MSVC +) diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt new file mode 100644 index 0000000000..8d723cf3ce --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt @@ -0,0 +1,41 @@ +# Generated from lib.pro. + +##################################################################### +## tst_qpluginloaderlib Generic Library: +##################################################################### + +add_cmake_library(tst_qpluginloaderlib + SHARED + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin" + SOURCES + mylib.c + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:lib.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/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(tst_qpluginloaderlib CONDITION MSVC + DEFINES + WIN32_MSVC +) + +# special case begin +set_target_properties(tst_qpluginloaderlib PROPERTIES + C_VISIBILITY_PRESET "default" + CXX_VISIBILITY_PRESET "default" +) +# special case end diff --git a/tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt new file mode 100644 index 0000000000..05cd044aa3 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/machtest/CMakeLists.txt @@ -0,0 +1,2 @@ +# Generated from machtest.pro. + diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt new file mode 100644 index 0000000000..bfc30d7c1d --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/.prev_CMakeLists.txt @@ -0,0 +1,23 @@ +# Generated from staticplugin.pro. + +##################################################################### +## staticplugin Generic Library: +##################################################################### + +add_cmake_library(staticplugin + STATIC + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core + MOC_OPTIONS + "-M" + "ExtraMetaData=StaticPlugin" + "-M" + "ExtraMetaData=foo" +) + +#### Keys ignored in scope 1:.:.:staticplugin.pro:<TRUE>: +# TEMPLATE = "lib" + +qt_autogen_tools_initial_setup(staticplugin) diff --git a/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt new file mode 100644 index 0000000000..fb9d365d74 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt @@ -0,0 +1,25 @@ +# Generated from staticplugin.pro. + +##################################################################### +## staticplugin Generic Library: +##################################################################### + +add_cmake_library(staticplugin + STATIC + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core + MOC_OPTIONS + "-M" + "ExtraMetaData=StaticPlugin" + "-M" + "ExtraMetaData=foo" +) + +#### Keys ignored in scope 1:.:.:staticplugin.pro:<TRUE>: +# TEMPLATE = "lib" + +qt_autogen_tools_initial_setup(staticplugin) + +target_compile_definitions(staticplugin PRIVATE QT_STATICPLUGIN) diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt new file mode 100644 index 0000000000..5389790fba --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from theplugin.pro. + +##################################################################### +## theplugin Generic Library: +##################################################################### + +add_cmake_library(theplugin + MODULE + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin" + SOURCES + theplugin.cpp theplugin.h + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:theplugin.pro:<TRUE>: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin" + +## Scopes: +##################################################################### + +#### Keys ignored in scope 5:.:..:../winrt.pri:(CMAKE_BUILD_TYPE STREQUAL Debug): +# DESTDIR = "../debug/bin" + +#### Keys ignored in scope 6:.:..:../winrt.pri:else: +# DESTDIR = "../release/bin" + +qt_autogen_tools_initial_setup(theplugin) diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt new file mode 100644 index 0000000000..8bef975168 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/tst/.prev_CMakeLists.txt @@ -0,0 +1,45 @@ +# Generated from tst.pro. + +##################################################################### +## tst_qpluginloader Test: +##################################################################### + +# Collect test data +list(APPEND test_data "../elftest") +list(APPEND test_data "../machtest") + +add_qt_test(tst_qpluginloader + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../fakeplugin.cpp + ../theplugin/plugininterface.h + ../tst_qpluginloader.cpp + PUBLIC_LIBRARIES + staticplugin + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests + LIBRARIES + Qt::CorePrivate + PUBLIC_LIBRARIES + Qt::Core +) + +extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release + PUBLIC_LIBRARIES + # Remove: L../staticplugin/debug +) + +extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug + PUBLIC_LIBRARIES + # Remove: L../staticplugin/release +) + +extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release + PUBLIC_LIBRARIES + # Remove: L../staticplugin +) diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt new file mode 100644 index 0000000000..8bef975168 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/tst/CMakeLists.txt @@ -0,0 +1,45 @@ +# Generated from tst.pro. + +##################################################################### +## tst_qpluginloader Test: +##################################################################### + +# Collect test data +list(APPEND test_data "../elftest") +list(APPEND test_data "../machtest") + +add_qt_test(tst_qpluginloader + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" + SOURCES + ../fakeplugin.cpp + ../theplugin/plugininterface.h + ../tst_qpluginloader.cpp + PUBLIC_LIBRARIES + staticplugin + TESTDATA ${test_data} +) + +## Scopes: +##################################################################### + +extend_target(tst_qpluginloader CONDITION QT_FEATURE_private_tests + LIBRARIES + Qt::CorePrivate + PUBLIC_LIBRARIES + Qt::Core +) + +extend_target(tst_qpluginloader CONDITION CMAKE_BUILD_TYPE STREQUAL Debug AND WIN32 AND debug_and_release + PUBLIC_LIBRARIES + # Remove: L../staticplugin/debug +) + +extend_target(tst_qpluginloader CONDITION WIN32 AND debug_and_release AND NOT CMAKE_BUILD_TYPE STREQUAL Debug + PUBLIC_LIBRARIES + # Remove: L../staticplugin/release +) + +extend_target(tst_qpluginloader CONDITION UNIX OR NOT debug_and_release + PUBLIC_LIBRARIES + # Remove: L../staticplugin +) diff --git a/tests/auto/corelib/plugin/quuid/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/CMakeLists.txt new file mode 100644 index 0000000000..91e75fe0ae --- /dev/null +++ b/tests/auto/corelib/plugin/quuid/CMakeLists.txt @@ -0,0 +1,4 @@ +# Generated from quuid.pro. + +add_subdirectory(testProcessUniqueness) +add_subdirectory(test) diff --git a/tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt b/tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt new file mode 100644 index 0000000000..c635f6479c --- /dev/null +++ b/tests/auto/corelib/plugin/quuid/test/.prev_CMakeLists.txt @@ -0,0 +1,29 @@ +# Generated from test.pro. + +##################################################################### +## tst_quuid Test: +##################################################################### + +add_qt_test(tst_quuid + SOURCES + ../tst_quuid.cpp +) + +## Scopes: +##################################################################### + +extend_target(tst_quuid CONDITION APPLE + SOURCES + ../tst_quuid_darwin.mm + PUBLIC_LIBRARIES + ${FWFoundation} +) + +#### Keys ignored in scope 4:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug): +# DESTDIR = "../debug" + +#### Keys ignored in scope 5:.:.:test.pro:else: +# DESTDIR = "../release" + +#### Keys ignored in scope 6:.:.:test.pro:else: +# DESTDIR = ".." diff --git a/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt new file mode 100644 index 0000000000..5707dfa5a1 --- /dev/null +++ b/tests/auto/corelib/plugin/quuid/test/CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from test.pro. + +##################################################################### +## tst_quuid Test: +##################################################################### + +add_qt_test(tst_quuid + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../" # special case + SOURCES + ../tst_quuid.cpp +) + +## Scopes: +##################################################################### + +extend_target(tst_quuid CONDITION APPLE + SOURCES + ../tst_quuid_darwin.mm + PUBLIC_LIBRARIES + ${FWFoundation} +) + +#### Keys ignored in scope 4:.:.:test.pro:(CMAKE_BUILD_TYPE STREQUAL Debug): +# DESTDIR = "../debug" + +#### Keys ignored in scope 5:.:.:test.pro:else: +# DESTDIR = "../release" + +#### Keys ignored in scope 6:.:.:test.pro:else: +# DESTDIR = ".." diff --git a/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt new file mode 100644 index 0000000000..39ff85c466 --- /dev/null +++ b/tests/auto/corelib/plugin/quuid/testProcessUniqueness/CMakeLists.txt @@ -0,0 +1,12 @@ +# Generated from testProcessUniqueness.pro. + +##################################################################### +## testProcessUniqueness Binary: +##################################################################### + +add_qt_executable(testProcessUniqueness + INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_quuid/testProcessUniqueness" + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/" + SOURCES + main.cpp +) |