summaryrefslogtreecommitdiffstats
path: root/src/testlib/CMakeLists.txt
blob: ed8d2c8df74f6519b657bba09a3f05feebe064ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#####################################################################
## Test Module:
#####################################################################

add_qt_module(Test
    # Typically the Qt module name results in qt${module}-config.h, but
    # testlib is an exception where QtTest uses qttestlib-config.h.
    CONFIG_MODULE_NAME "testlib"
    SOURCES
        qabstracttestlogger.cpp
        qasciikey.cpp
        qbenchmark.cpp qbenchmark.h qbenchmark_p.h
        qbenchmarkevent.cpp qbenchmarkevent_p.h
        qbenchmarkmeasurement.cpp qbenchmarkmeasurement_p.h
        qbenchmarkmetric.cpp qbenchmarkmetric.h qbenchmarkmetric_p.h
        qbenchmarkperfevents.cpp qbenchmarkperfevents_p.h
        qbenchmarktimemeasurers_p.h
        qbenchmarkvalgrind.cpp qbenchmarkvalgrind_p.h
        qcsvbenchmarklogger.cpp
        qplaintestlogger.cpp
        qsignaldumper.cpp
        qsignalspy.h
        qtaptestlogger.cpp qtaptestlogger_p.h
        qteamcitylogger.cpp
        qtest.h
        qtest_gui.h
        qtest_network.h
        qtest_widgets.h
        qtestaccessible.h
        qtestassert.h
        qtestblacklist.cpp qtestblacklist_p.h
        qtestcase.cpp qtestcase.h
        qtestdata.cpp qtestdata.h
        qtestelement.cpp
        qtestelementattribute.cpp
        qtestevent.h
        qtesteventloop.h
        qtesthelpers_p.h
        qtestkeyboard.h
        qtestlog.cpp
        qtestmouse.cpp qtestmouse.h
        qtestresult.cpp
        qtestspontaneevent.h
        qtestsystem.h
        qtesttable.cpp
        qtesttouch.h
        qtestxunitstreamer.cpp
        qttestglobal.h
        qxmltestlogger.cpp
        qxunittestlogger.cpp
    LIBRARIES
        Qt::CorePrivate
    PUBLIC_LIBRARIES
        Qt::Core
    DEFINES
        QT_NO_CAST_FROM_ASCII
        QT_NO_FOREACH
        QT_NO_DATASTREAM
)

# Typically the module name is also the define symbol, but testlib works
# differently and uses QT_BUILD_TESTLIB_LIB, derived from the name testlib.pro.
set_target_properties(Test PROPERTIES DEFINE_SYMBOL QT_BUILD_TESTLIB_LIB)

### Platform support:
#####################################################################
extend_target(Test CONDITION APPLE
    SOURCES
        qappletestlogger.cpp qappletestlogger_p.h
    LIBRARIES ${FWSecurity}

    # FIXME: Skip XCTEST support, disabled in qmake build system
)

extend_target(Test CONDITION APPLE_OSX
    SOURCES qtestutil_macos.mm qtestutil_macos_p.h
    LIBRARIES ${FWFoundation} ${FWApplicationServices} ${FWIOKit}
)


### Feature support:
#####################################################################

## itemmodeltester:
extend_target(Test CONDITION QT_FEATURE_itemmodeltester
    SOURCES qabstractitemmodeltester.cpp qabstractitemmodeltester.h
)

add_qt_docs(./doc/qttestlib.qdocconf)