Revision control

Copy as Markdown

# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## QuickControls2IOS Module:
#####################################################################
add_subdirectory(impl)
set(qml_files
"Slider.qml"
"RangeSlider.qml"
"Switch.qml"
"Button.qml"
"CheckBox.qml"
"RadioButton.qml"
"SpinBox.qml"
"DoubleSpinBox.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"
"HorizontalHeaderViewDelegate.qml"
"VerticalHeaderView.qml"
"VerticalHeaderViewDelegate.qml"
"Dialog.qml"
"DialogButtonBox.qml"
"DelayButton.qml"
"SelectionRectangle.qml"
"ToolTip.qml"
"ToolSeparator.qml"
"ApplicationWindow.qml"
"SearchField.qml"
)
set_source_files_properties(Slider.qml PROPERTIES
QT_QML_SOURCE_VERSIONS "2.2;6.0"
)
set_source_files_properties(HorizontalHeaderViewDelegate.qml PROPERTIES
QT_QML_SOURCE_VERSIONS "6.10"
)
set_source_files_properties(VerticalHeaderViewDelegate.qml PROPERTIES
QT_QML_SOURCE_VERSIONS "6.10"
)
set_source_files_properties(SearchField.qml PROPERTIES
QT_QML_SOURCE_VERSIONS "6.10"
)
qt_internal_add_qml_module(QuickControls2IOS
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
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::QuickControls2BasicPrivate
)
qt_internal_extend_target(QuickControls2IOS CONDITION APPLE AND IOS
LIBRARIES
${FWUIKit}
LINK_OPTIONS
"-fobjc-link-runtime"
)
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_qtquickcontrols2ios_resource_files
${resource_glob}
)
qt_internal_add_resource(QuickControls2IOS "qmake_qtquickcontrols2ios"
PREFIX
"/qt-project.org/imports/QtQuick/Controls/iOS"
FILES
${qmake_qtquickcontrols2ios_resource_files}
)
target_sources(qtquickcontrols2iosstyleplugin
PRIVATE
qtquickcontrols2iosstyleplugin.cpp
)
qt_internal_extend_target(qtquickcontrols2iosstyleplugin
LIBRARIES
Qt::QuickControls2Private
Qt::QuickTemplates2Private
)
_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)