blob: e0332cab4ec27072de912685cbea8a027a7a7407 (
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
#### Libraries
find_package(PkgConfig)
if(PkgConfig_FOUND)
pkg_check_modules(ALSA alsa IMPORTED_TARGET)
pkg_check_modules(PULSEAUDIO libpulse>=0.9.10 libpulse-mainloop-glib)
pkg_check_modules(GIO gio-2.0)
pkg_check_modules(XDAMAGE xdamage)
endif()
find_package(Qt6 ${PROJECT_VERSION} CONFIG QUIET OPTIONAL_COMPONENTS Positioning WebChannel PrintSupport)
#### Tests
qt_config_compile_test(alsa
LABEL "alsa"
LIBRARIES
PkgConfig::ALSA
CODE
"
#include \"alsa/asoundlib.h\"
#if SND_LIB_VERSION < 0x1000a // 1.0.10
#error Alsa version found too old, require >= 1.0.10
#endif
int main(){};
")
#### Features
qt_feature("webengine-embedded-build" PRIVATE
LABEL "Embedded build"
PURPOSE "Enables the embedded build configuration."
AUTODETECT CMAKE_CROSSCOMPILING
CONDITION UNIX
)
qt_feature("webengine-system-alsa" PRIVATE
LABEL "Use ALSA"
CONDITION UNIX AND TEST_alsa
)
qt_feature("webengine-v8-snapshot-support" PRIVATE
LABEL "Building v8 snapshot supported"
CONDITION NOT UNIX OR NOT QT_FEATURE_cross_compile OR ( TEST_architecture_arch STREQUAL arm64 ) OR TEST_webengine_host_compiler
)
qt_feature("webengine-geolocation" PUBLIC
LABEL "Geolocation"
CONDITION TARGET Qt::Positioning
)
qt_feature("webengine-system-pulseaudio" PRIVATE
LABEL "Use PulseAudio"
AUTODETECT UNIX
CONDITION PULSEAUDIO_FOUND
)
qt_feature("webengine-pepper-plugins" PRIVATE
LABEL "Pepper Plugins"
PURPOSE "Enables use of Pepper Flash plugins."
AUTODETECT NOT QT_FEATURE_webengine_embedded_build
)
qt_feature("webengine-printing-and-pdf" PRIVATE
LABEL "Printing and PDF"
PURPOSE "Provides printing and output to PDF."
AUTODETECT NOT QT_FEATURE_webengine_embedded_build
CONDITION TARGET Qt::PrintSupport AND QT_FEATURE_printer
)
qt_feature("webengine-webchannel" PUBLIC
SECTION "WebEngine"
LABEL "WebChannel support"
PURPOSE "Provides QtWebChannel integration."
CONDITION TARGET Qt::WebChannel
)
qt_feature("webengine-proprietary-codecs" PRIVATE
SECTION "WebEngine"
LABEL "Proprietary Codecs"
PURPOSE "Enables the use of proprietary codecs such as h.264/h.265 and MP3."
AUTODETECT OFF
)
qt_feature("webengine-kerberos" PRIVATE
SECTION "WebEngine"
LABEL "Kerberos Authentication"
PURPOSE "Enables Kerberos Authentication Support"
AUTODETECT WIN32
)
qt_feature("webengine-spellchecker" PUBLIC
LABEL "Spellchecker"
PURPOSE "Provides a spellchecker."
)
qt_feature("webengine-native-spellchecker" PUBLIC
LABEL "Native Spellchecker"
PURPOSE "Use the system's native spellchecking engine."
AUTODETECT OFF
CONDITION MACOS AND QT_FEATURE_webengine_spellchecker
)
qt_feature("webengine-extensions" PUBLIC
SECTION "WebEngine"
LABEL "Extensions"
PURPOSE "Enables Chromium extensions within certain limits. Currently used for enabling the pdf viewer."
AUTODETECT QT_FEATURE_webengine_printing_and_pdf
CONDITION QT_FEATURE_webengine_printing_and_pdf
)
qt_feature("webengine-webrtc" PRIVATE
LABEL "WebRTC"
PURPOSE "Provides WebRTC support."
AUTODETECT NOT QT_FEATURE_webengine_embedded_build
CONDITION XDAMAGE_FOUND OR NOT QT_FEATURE_webengine_ozone_x11
)
qt_feature("webengine-webrtc-pipewire" PRIVATE
LABEL "PipeWire over GIO"
PURPOSE "Provides PipeWire support in WebRTC using GIO."
AUTODETECT false
CONDITION QT_FEATURE_webengine_webrtc AND GIO_FOUND
)
qt_feature_config("webengine-full-debug-info" QMAKE_PRIVATE_CONFIG
NAME "v8base_debug"
)
qt_feature_config("webengine-full-debug-info" QMAKE_PRIVATE_CONFIG
NAME "webcore_debug"
)
qt_configure_add_summary_section(NAME "Qt WebEngineCore")
qt_configure_add_summary_entry(ARGS "webengine-embedded-build")
qt_configure_add_summary_entry(ARGS "webengine-full-debug-info")
qt_configure_add_summary_entry(ARGS "webengine-pepper-plugins")
qt_configure_add_summary_entry(ARGS "webengine-printing-and-pdf")
qt_configure_add_summary_entry(ARGS "webengine-proprietary-codecs")
qt_configure_add_summary_entry(ARGS "webengine-spellchecker")
qt_configure_add_summary_entry(ARGS "webengine-native-spellchecker")
qt_configure_add_summary_entry(ARGS "webengine-webrtc")
qt_configure_add_summary_entry(ARGS "webengine-webrtc-pipewire")
qt_configure_add_summary_entry(ARGS "webengine-geolocation")
qt_configure_add_summary_entry(ARGS "webengine-webchannel")
qt_configure_add_summary_entry(ARGS "webengine-kerberos")
qt_configure_add_summary_entry(ARGS "webengine-extensions")
qt_configure_add_summary_entry(
ARGS "webengine-ozone-x11"
CONDITION UNIX
)
qt_configure_add_summary_entry(
ARGS "webengine-v8-snapshot-support"
CONDITION UNIX AND cross_compile
)
qt_configure_add_summary_entry(
ARGS "webengine-system-alsa"
CONDITION UNIX
)
qt_configure_add_summary_entry(
ARGS "webengine-system-pulseaudio"
CONDITION UNIX
)
qt_configure_end_summary_section() # end of "Qt WebEngineCore" section
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "Thumb instruction set is required to build ffmpeg for QtWebEngine."
CONDITION LINUX AND QT_FEATURE_webengine_embedded_build AND NOT QT_FEATURE_webengine_system_ffmpeg AND ( TEST_architecture_arch STREQUAL arm ) AND NOT QT_FEATURE_webengine_arm_thumb
)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "V8 snapshot cannot be built. Most likely, the 32-bit host compiler does not work. Please make sure you have 32-bit devel environment installed."
CONDITION UNIX AND cross_compile AND NOT QT_FEATURE_webengine_v8_snapshot_support
)
qt_configure_add_report_entry(
TYPE WARNING
MESSAGE "WebRTC requires XDamage with qpa_xcb."
CONDITION QT_FEATURE_webengine_ozone_x11 AND NOT XDAMAGE_FOUND
)
|