summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qlogging/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/global/qlogging/CMakeLists.txt')
-rw-r--r--tests/auto/corelib/global/qlogging/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/corelib/global/qlogging/CMakeLists.txt b/tests/auto/corelib/global/qlogging/CMakeLists.txt
index bfbf62dccd..f35c9c4192 100644
--- a/tests/auto/corelib/global/qlogging/CMakeLists.txt
+++ b/tests/auto/corelib/global/qlogging/CMakeLists.txt
@@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
+if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
+ cmake_minimum_required(VERSION 3.16)
+ project(tst_qlogging LANGUAGES CXX)
+ find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
+endif()
+
qt_internal_add_executable(qlogging_helper
NO_INSTALL
OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -17,9 +23,10 @@ set_target_properties(qlogging_helper PROPERTIES CXX_VISIBILITY_PRESET default)
qt_internal_add_test(tst_qlogging SOURCES tst_qlogging.cpp
DEFINES
QT_MESSAGELOGCONTEXT
- HELPER_BINARY="${CMAKE_CURRENT_BINARY_DIR}/qlogging_helper"
)
+add_dependencies(tst_qlogging qlogging_helper)
+
qt_internal_add_test(tst_qmessagelogger SOURCES tst_qmessagelogger.cpp
DEFINES
QT_MESSAGELOGCONTEXT