summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qpluginloader/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/plugin/qpluginloader/lib')
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt34
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/lib.pro14
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/lib/mylib.c29
3 files changed, 36 insertions, 41 deletions
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..283bdb1352
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/CMakeLists.txt
@@ -0,0 +1,34 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## tst_qpluginloaderlib Generic Library:
+#####################################################################
+
+qt_internal_add_cmake_library(tst_qpluginloaderlib
+ SHARED
+ INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
+ SOURCES
+ mylib.c
+ LIBRARIES
+ Qt::Core
+)
+
+if(WIN32)
+ # CMake sets for Windows-GNU platforms the suffix "lib"
+ set_property(TARGET tst_qpluginloaderlib PROPERTY PREFIX "")
+endif()
+
+## Scopes:
+#####################################################################
+
+qt_internal_extend_target(tst_qpluginloaderlib CONDITION MSVC
+ DEFINES
+ WIN32_MSVC
+)
+
+set_target_properties(tst_qpluginloaderlib PROPERTIES
+ C_VISIBILITY_PRESET "default"
+ CXX_VISIBILITY_PRESET "default"
+)
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro b/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro
deleted file mode 100644
index 9fc76a4201..0000000000
--- a/tests/auto/corelib/plugin/qpluginloader/lib/lib.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-TEMPLATE = lib
-CONFIG += dll
-CONFIG -= staticlib
-SOURCES = mylib.c
-TARGET = tst_qpluginloaderlib
-DESTDIR = ../bin
-winrt:include(../winrt.pri)
-QT = core
-
-msvc: DEFINES += WIN32_MSVC
-
-# This is testdata for the tst_qpluginloader test.
-target.path = $$[QT_INSTALL_TESTS]/tst_qpluginloader/bin
-INSTALLS += target
diff --git a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
index 8d23b999c4..3f1fe03114 100644
--- a/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
+++ b/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <qglobal.h>