| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
##################################################################### |
| 5 |
## tst_qguieventdispatcher Test: |
| 6 |
##################################################################### |
| 7 |
|
| 8 |
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) |
| 9 |
cmake_minimum_required(VERSION 3.16) |
| 10 |
project(tst_qguieventdispatcher LANGUAGES CXX) |
| 11 |
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) |
| 12 |
endif() |
| 13 |
|
| 14 |
set(test_names "tst_qguieventdispatcher") |
| 15 |
if(QT_FEATURE_glib AND UNIX) |
| 16 |
list(APPEND test_names "tst_qguieventdispatcher_no_glib") |
| 17 |
endif() |
| 18 |
|
| 19 |
foreach(test ${test_names}) |
| 20 |
qt_internal_add_test(${test} |
| 21 |
NO_BATCH |
| 22 |
SOURCES |
| 23 |
../../../corelib/kernel/qeventdispatcher/tst_qeventdispatcher.cpp |
| 24 |
DEFINES |
| 25 |
QTEST_THROW_ON_FAIL |
| 26 |
QTEST_THROW_ON_SKIP |
| 27 |
LIBRARIES |
| 28 |
Qt::Gui |
| 29 |
) |
| 30 |
endforeach() |
| 31 |
|
| 32 |
qt_internal_extend_target(tst_qguieventdispatcher |
| 33 |
DEFINES |
| 34 |
tst_QEventDispatcher=tst_qguieventdispatcher |
| 35 |
) |
| 36 |
|
| 37 |
if (TARGET tst_qeventdispatcher_no_glib) |
| 38 |
qt_internal_extend_target(tst_qguieventdispatcher_no_glib |
| 39 |
DEFINES |
| 40 |
DISABLE_GLIB |
| 41 |
tst_QEventDispatcher=tst_qguieventdispatcher_no_glib |
| 42 |
) |
| 43 |
endif() |