aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/ios/CMakeLists.txt
blob: c4c827677a7262bc4ce07b4a74404c3c2962d7e6 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

#####################################################################
## qtquickcontrols2iosstyleplugin Plugin:
#####################################################################

set(qml_files
    "Slider.qml"
    "RangeSlider.qml"
    "Switch.qml"
    "Button.qml"
    "CheckBox.qml"
    "RadioButton.qml"
    "SpinBox.qml"
    "ProgressBar.qml"
    "Dial.qml"
    "PageIndicator.qml"
    "TextArea.qml"
    "TextField.qml"
    "ScrollIndicator.qml"
    "ItemDelegate.qml"
    "SwitchDelegate.qml"
    "RadioDelegate.qml"
    "CheckDelegate.qml"
    "SwipeDelegate.qml"
    "StackView.qml"
    "TreeViewDelegate.qml"
    "ScrollBar.qml"
    "TabButton.qml"
    "ToolButton.qml"
    "MenuBarItem.qml"
    "Frame.qml"
    "GroupBox.qml"
    "SplitView.qml"
    "TabBar.qml"
    "ToolBar.qml"
    "MenuBar.qml"
    "Drawer.qml"
    "Popup.qml"
    "Menu.qml"
    "MenuItem.qml"
    "MenuSeparator.qml"
    "BusyIndicator.qml"
    "ComboBox.qml"
    "HorizontalHeaderView.qml"
    "VerticalHeaderView.qml"
    "Dialog.qml"
    "DialogButtonBox.qml"
    "DelayButton.qml"
    "SelectionRectangle.qml"
    "ToolTip.qml"
    "ToolSeparator.qml"
)

set_source_files_properties(Slider.qml PROPERTIES
    QT_QML_SOURCE_VERSIONS "2.2;6.0"
)

qt_internal_add_qml_module(qtquickcontrols2iosstyleplugin
    URI "QtQuick.Controls.iOS"
    VERSION "${PROJECT_VERSION}"
    CLASS_NAME QtQuickControls2IOSStylePlugin
    IMPORTS
        QtQuick.Controls.Basic/auto
    PAST_MAJOR_VERSIONS 2
    PLUGIN_TARGET qtquickcontrols2iosstyleplugin
    NO_PLUGIN_OPTIONAL
    NO_GENERATE_PLUGIN_SOURCE
    SOURCES
        qtquickcontrols2iosstyleplugin.cpp
        qquickiostheme_p.h qquickiostheme.mm
    QML_FILES
        ${qml_files}
    DEFINES
        QT_NO_CAST_FROM_ASCII
        QT_NO_CAST_TO_ASCII
    LIBRARIES
        Qt::CorePrivate
        Qt::GuiPrivate
        Qt::QmlPrivate
        Qt::QuickControls2IOSStyleImpl
        Qt::QuickControls2ImplPrivate
        Qt::QuickControls2Private
        Qt::QuickPrivate
        Qt::QuickTemplates2Private
)

qt_internal_extend_target(qtquickcontrols2iosstyleplugin CONDITION APPLE AND IOS
    LIBRARIES
        ${FWUIKit}
)

file(GLOB resource_glob RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "images/*.png")
foreach(file IN LISTS resource_glob_0)
    set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/${file}" PROPERTIES QT_RESOURCE_ALIAS "${file}")
endforeach()

# Resources:
set(qmake_qtquickcontrols2iosstyleplugin_resource_files
    ${resource_glob}
)

qt_internal_add_resource(qtquickcontrols2iosstyleplugin "qmake_qtquickcontrols2iosstyleplugin"
    PREFIX
        "/qt-project.org/imports/QtQuick/Controls/iOS"
    FILES
        ${qmake_qtquickcontrols2iosstyleplugin_resource_files}
)

add_subdirectory(impl)

_qt_internal_add_qml_static_plugin_dependency(qtquickcontrols2iosstyleplugin
                                              qtquickcontrols2iosstyleimplplugin)

# Basic style is the required fallback style.
_qt_internal_add_qml_static_plugin_dependency(qtquickcontrols2iosstyleplugin
                                             qtquickcontrols2basicstyleplugin)