diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8414e974ae..f742a2187b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,7 @@ # special case begin if(NOT TARGET Qt::Test) cmake_minimum_required(VERSION 3.14.0) - project(QtBaseTests C CXX ASM) + project(QtBaseTests VERSION 6.0.0 LANGUAGES C CXX ASM) find_package(Qt6 REQUIRED COMPONENTS BuildInternals Core Test) find_package(Qt6 COMPONENTS DBus Gui OpenGL Widgets Xml) qt_set_up_standalone_tests_build() diff --git a/tests/auto/corelib/CMakeLists.txt b/tests/auto/corelib/CMakeLists.txt index d9137d49e3..1029b14654 100644 --- a/tests/auto/corelib/CMakeLists.txt +++ b/tests/auto/corelib/CMakeLists.txt @@ -8,7 +8,7 @@ if(NOT APPLE_UIKIT) add_subdirectory(io) add_subdirectory(itemmodels) add_subdirectory(mimetypes) - # add_subdirectory(plugin) # special case missing project + add_subdirectory(plugin) add_subdirectory(serialization) add_subdirectory(statemachine) add_subdirectory(text) 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..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:: +# 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:: +# 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() 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/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:: +# 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 + $ + "${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.so" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ + "${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 + $ + "${CMAKE_CURRENT_BINARY_DIR}/../system.qt.test.mylib.dll" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + $ + "${CMAKE_CURRENT_BINARY_DIR}/../mylib.dl2" + ) +endif() +# special case end + +#### Keys ignored in scope 1:.:.:lib2.pro:: +# 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..250521a8d4 --- /dev/null +++ b/tests/auto/corelib/plugin/qlibrary/tst/.prev_CMakeLists.txt @@ -0,0 +1,36 @@ +# Generated from tst.pro. + +##################################################################### +## tst_qlibrary Test: +##################################################################### + +# Collect test data +list(APPEND test_data "../library_path/invalid.so") + +add_qt_test(tst_qlibrary + 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..d041238bc8 --- /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}/../" # special case + 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..5b9a21cb3b --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/debugplugin/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from debugplugin.pro. + +##################################################################### +## debugplugin Plugin: +##################################################################### + +add_qt_plugin(debugplugin + SKIP_INSTALL + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:debugplugin.pro:: +# TEMPLATE = "lib" 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..e053008d54 --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/invalidplugin/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from invalidplugin.pro. + +##################################################################### +## invalidplugin Plugin: +##################################################################### + +add_qt_plugin(invalidplugin + SKIP_INSTALL + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:invalidplugin.pro:: +# TEMPLATE = "lib" 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..cb09cb4207 --- /dev/null +++ b/tests/auto/corelib/plugin/qplugin/releaseplugin/CMakeLists.txt @@ -0,0 +1,17 @@ +# Generated from releaseplugin.pro. + +##################################################################### +## releaseplugin Plugin: +##################################################################### + +add_qt_plugin(releaseplugin + SKIP_INSTALL + OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../plugins" + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core +) + +#### Keys ignored in scope 1:.:.:releaseplugin.pro:: +# TEMPLATE = "lib" 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/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt new file mode 100644 index 0000000000..62653e1a65 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/CMakeLists.txt @@ -0,0 +1,31 @@ +# Generated from almostplugin.pro. + +##################################################################### +## almostplugin Plugin: +##################################################################### + +add_qt_plugin(almostplugin + ALLOW_UNDEFINED_SYMBOLS # special case + 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:: +# INSTALLS = "target" +# TEMPLATE = "lib" +# target.path = "$$[QT_INSTALL_TESTS]/tst_qpluginloader/bin" + +## Scopes: +##################################################################### + +# 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/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:: +# 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/CMakeLists.txt b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt new file mode 100644 index 0000000000..b29ef3f982 --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/staticplugin/CMakeLists.txt @@ -0,0 +1,23 @@ +# Generated from staticplugin.pro. + +##################################################################### +## staticplugin Plugin: +##################################################################### + +add_qt_plugin(staticplugin + OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} # special case + SKIP_INSTALL + STATIC + SOURCES + main.cpp + PUBLIC_LIBRARIES + Qt::Core + MOC_OPTIONS + "-M" + "ExtraMetaData=StaticPlugin" + "-M" + "ExtraMetaData=foo" +) + +#### Keys ignored in scope 1:.:.:staticplugin.pro:: +# TEMPLATE = "lib" 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..3eb62d511a --- /dev/null +++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt @@ -0,0 +1,28 @@ +# Generated from theplugin.pro. + +##################################################################### +## theplugin Plugin: +##################################################################### + +add_qt_plugin(theplugin + 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:: +# 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" 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..c456eae4ba --- /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}/../" # special case + 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 + PUBLIC_LIBRARIES + # Remove: L../staticplugin/debug +) + +extend_target(tst_qpluginloader CONDITION WIN32 AND NOT CMAKE_BUILD_TYPE STREQUAL Debug + PUBLIC_LIBRARIES + # Remove: L../staticplugin/release +) + +extend_target(tst_qpluginloader CONDITION UNIX + 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/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 +)