summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/CMakeLists.txt
blob: 32e4eb8051aa61b7f39ecf7b6b9b5751659dbb1e (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
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

#####################################################################
## QIOSIntegrationPlugin Plugin:
#####################################################################

qt_internal_add_plugin(QIOSIntegrationPlugin
    OUTPUT_NAME qios
    STATIC # Force static, even in shared builds
    DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES ios
    PLUGIN_TYPE platforms
    SOURCES
        plugin.mm
        qiosapplicationdelegate.h qiosapplicationdelegate.mm
        qiosapplicationstate.h qiosapplicationstate.mm
        qioseventdispatcher.h qioseventdispatcher.mm
        qiosglobal.h qiosglobal.mm
        qiosinputcontext.h qiosinputcontext.mm
        qiosintegration.h qiosintegration.mm
        qiosplatformaccessibility.h qiosplatformaccessibility.mm
        qiosscreen.h qiosscreen.mm
        qiosservices.h qiosservices.mm
        qiostextresponder.h qiostextresponder.mm
        qiostheme.h qiostheme.mm
        qiosviewcontroller.h qiosviewcontroller.mm
        qioswindow.h qioswindow.mm
        quiaccessibilityelement.h quiaccessibilityelement.mm
        quiview.h quiview.mm
        uistrings_p.h uistrings.cpp
    NO_PCH_SOURCES
        qioscontext.mm # undef QT_NO_FOREACH
        qiosintegration.mm # undef QT_NO_FOREACH
        qiosplatformaccessibility.mm # undef QT_NO_FOREACH
        qiosscreen.mm # undef QT_NO_FOREACH
    LIBRARIES
        ${FWAudioToolbox}
        ${FWFoundation}
        ${FWMetal}
        ${FWQuartzCore}
        ${FWUIKit}
        ${FWCoreGraphics}
        Qt::CorePrivate
        Qt::GuiPrivate
)

qt_disable_apple_app_extension_api_only(QIOSIntegrationPlugin)

## Scopes:
#####################################################################
qt_internal_find_apple_system_framework(FWUniformTypeIdentifiers UniformTypeIdentifiers)

qt_internal_extend_target(QIOSIntegrationPlugin CONDITION QT_FEATURE_opengl
    SOURCES
        qioscontext.h qioscontext.mm
    LIBRARIES
        Qt::OpenGLPrivate
)

qt_internal_extend_target(QIOSIntegrationPlugin CONDITION QT_FEATURE_clipboard
    SOURCES
        qiosclipboard.h qiosclipboard.mm
)

qt_internal_extend_target(QIOSIntegrationPlugin CONDITION NOT TVOS
    SOURCES
        qiosfiledialog.h qiosfiledialog.mm
        qiosdocumentpickercontroller.h qiosdocumentpickercontroller.mm
    LIBRARIES
        ${FWUniformTypeIdentifiers}
        ${FWPhotos}
)

qt_internal_extend_target(QIOSIntegrationPlugin CONDITION NOT TVOS
    SOURCES
        qioscolordialog.h qioscolordialog.mm
        qiosfontdialog.h qiosfontdialog.mm
        qiosmessagedialog.h qiosmessagedialog.mm
)

qt_internal_extend_target(QIOSIntegrationPlugin CONDITION NOT (TVOS OR VISIONOS)
    SOURCES
        qiosmenu.h qiosmenu.mm
        qiostextinputoverlay.h qiostextinputoverlay.mm
)

add_subdirectory(optional)