summaryrefslogtreecommitdiff
path: root/src/gui/configure.cmake
blob: a714a3a7037b0ce9b1e77040d0f429e841f38837 (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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268


#### Inputs

# input freetype
set(INPUT_freetype "undefined" CACHE STRING "")
set_property(CACHE INPUT_freetype PROPERTY STRINGS undefined no qt system)

# input harfbuzz
set(INPUT_harfbuzz "undefined" CACHE STRING "")
set_property(CACHE INPUT_harfbuzz PROPERTY STRINGS undefined no qt system)

# input libjpeg
set(INPUT_libjpeg "undefined" CACHE STRING "")
set_property(CACHE INPUT_libjpeg PROPERTY STRINGS undefined no qt system)

# input libmd4c
set(INPUT_libmd4c "undefined" CACHE STRING "")
set_property(CACHE INPUT_libmd4c PROPERTY STRINGS undefined no qt system)

# input libpng
set(INPUT_libpng "undefined" CACHE STRING "")
set_property(CACHE INPUT_libpng PROPERTY STRINGS undefined no qt system)



#### Libraries

qt_find_package(ATSPI2 PROVIDED_TARGETS PkgConfig::ATSPI2 MODULE_NAME gui QMAKE_LIB atspi)
qt_find_package(DirectFB PROVIDED_TARGETS PkgConfig::DirectFB MODULE_NAME gui QMAKE_LIB directfb)
qt_find_package(Libdrm PROVIDED_TARGETS Libdrm::Libdrm MODULE_NAME gui QMAKE_LIB drm)
qt_find_package(EGL PROVIDED_TARGETS EGL::EGL MODULE_NAME gui QMAKE_LIB egl)
qt_find_package(WrapSystemFreetype PROVIDED_TARGETS WrapSystemFreetype::WrapSystemFreetype MODULE_NAME gui QMAKE_LIB freetype)
set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED)
if(QT_FEATURE_system_zlib)
    qt_add_qmake_lib_dependency(freetype zlib)
endif()
qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig)
qt_add_qmake_lib_dependency(fontconfig freetype)
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm)
qt_find_package(WrapSystemHarfbuzz PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
qt_find_package(Libinput PROVIDED_TARGETS Libinput::Libinput MODULE_NAME gui QMAKE_LIB libinput)
qt_find_package(JPEG PROVIDED_TARGETS JPEG::JPEG MODULE_NAME gui QMAKE_LIB libjpeg)
qt_find_package(WrapSystemPNG PROVIDED_TARGETS WrapSystemPNG::WrapSystemPNG MODULE_NAME gui QMAKE_LIB libpng)
if(QT_FEATURE_system_zlib)
    qt_add_qmake_lib_dependency(libpng zlib)
endif()
qt_find_package(Mtdev PROVIDED_TARGETS PkgConfig::Mtdev MODULE_NAME gui QMAKE_LIB mtdev)
qt_find_package(OpenGL PROVIDED_TARGETS OpenGL::GL MODULE_NAME gui QMAKE_LIB opengl)
qt_find_package(GLESv2 PROVIDED_TARGETS GLESv2::GLESv2 MODULE_NAME gui QMAKE_LIB opengl_es2)
qt_find_package(Tslib PROVIDED_TARGETS PkgConfig::Tslib MODULE_NAME gui QMAKE_LIB tslib)
qt_find_package(Vulkan PROVIDED_TARGETS Vulkan::Vulkan MODULE_NAME gui QMAKE_LIB vulkan)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(Wayland PROVIDED_TARGETS Wayland::Server MODULE_NAME gui QMAKE_LIB wayland_server)
endif()
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(X11 PROVIDED_TARGETS X11::X11 MODULE_NAME gui QMAKE_LIB xlib)
endif()
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(X11 PROVIDED_TARGETS ${X11_SM_LIB} ${X11_ICE_LIB} MODULE_NAME gui QMAKE_LIB x11sm)
endif()
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB 1.9 PROVIDED_TARGETS XCB::XCB MODULE_NAME gui QMAKE_LIB xcb)
endif()
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS ICCCM PROVIDED_TARGETS XCB::ICCCM MODULE_NAME gui QMAKE_LIB xcb_icccm)
endif()
qt_add_qmake_lib_dependency(xcb_icccm xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS IMAGE PROVIDED_TARGETS XCB::IMAGE MODULE_NAME gui QMAKE_LIB xcb_image)
endif()
qt_add_qmake_lib_dependency(xcb_image xcb_shm xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS KEYSYMS PROVIDED_TARGETS XCB::KEYSYMS MODULE_NAME gui QMAKE_LIB xcb_keysyms)
endif()
qt_add_qmake_lib_dependency(xcb_keysyms xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS RENDERUTIL PROVIDED_TARGETS XCB::RENDERUTIL MODULE_NAME gui QMAKE_LIB xcb_renderutil)
endif()
qt_add_qmake_lib_dependency(xcb_renderutil xcb xcb_render)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS RANDR PROVIDED_TARGETS XCB::RANDR MODULE_NAME gui QMAKE_LIB xcb_randr)
endif()
qt_add_qmake_lib_dependency(xcb_randr xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS SHAPE PROVIDED_TARGETS XCB::SHAPE MODULE_NAME gui QMAKE_LIB xcb_shape)
endif()
qt_add_qmake_lib_dependency(xcb_shape xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS SHM PROVIDED_TARGETS XCB::SHM MODULE_NAME gui QMAKE_LIB xcb_shm)
endif()
qt_add_qmake_lib_dependency(xcb_shm xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS SYNC PROVIDED_TARGETS XCB::SYNC MODULE_NAME gui QMAKE_LIB xcb_sync)
endif()
qt_add_qmake_lib_dependency(xcb_sync xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS XFIXES PROVIDED_TARGETS XCB::XFIXES MODULE_NAME gui QMAKE_LIB xcb_xfixes)
endif()
qt_add_qmake_lib_dependency(xcb_xfixes xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS XINERAMA PROVIDED_TARGETS XCB::XINERAMA MODULE_NAME gui QMAKE_LIB xcb_xinerama)
endif()
qt_add_qmake_lib_dependency(xcb_xinerama xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(X11_XCB PROVIDED_TARGETS X11::XCB MODULE_NAME gui QMAKE_LIB xcb_xlib)
endif()
qt_add_qmake_lib_dependency(xcb_xlib xcb xlib)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS XKB PROVIDED_TARGETS XCB::XKB MODULE_NAME gui QMAKE_LIB xcb_xkb)
endif()
qt_add_qmake_lib_dependency(xcb_xkb xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS RENDER PROVIDED_TARGETS XCB::RENDER MODULE_NAME gui QMAKE_LIB xcb_render)
endif()
qt_add_qmake_lib_dependency(xcb_render xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS GLX PROVIDED_TARGETS XCB::GLX MODULE_NAME gui QMAKE_LIB xcb_glx)
endif()
qt_add_qmake_lib_dependency(xcb_glx xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XCB COMPONENTS XINPUT PROVIDED_TARGETS XCB::XINPUT MODULE_NAME gui QMAKE_LIB xcb_xinput)
endif()
qt_add_qmake_lib_dependency(xcb_xinput xcb)
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XKB 0.4.1 PROVIDED_TARGETS XKB::XKB MODULE_NAME gui QMAKE_LIB xkbcommon)
endif()
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XKB_COMMON_X11 0.4.1 PROVIDED_TARGETS PkgConfig::XKB_COMMON_X11 MODULE_NAME gui QMAKE_LIB xkbcommon_x11)
endif()
if((LINUX) OR QT_FIND_ALL_PACKAGES_ALWAYS)
    qt_find_package(XRender PROVIDED_TARGETS PkgConfig::XRender MODULE_NAME gui QMAKE_LIB xrender)
endif()
qt_add_qmake_lib_dependency(xrender xlib)


#### Tests

# drm_atomic
qt_config_compile_test(drm_atomic
    LABEL "DRM Atomic API"
    LIBRARIES
        Libdrm::Libdrm
    CODE
"#include <stdlib.h>
#include <stdint.h>
extern \"C\" {
#include <xf86drmMode.h>
#include <xf86drm.h>
}
int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
drmModeAtomicReq *request;
    /* END TEST: */
    return 0;
}
")

# egl-x11
qt_config_compile_test(egl_x11
    LABEL "EGL on X11"
    LIBRARIES
        EGL::EGL
        X11::X11
    CODE
"// Check if EGL is compatible with X. Some EGL implementations, typically on
// embedded devices, are not intended to be used together with X. EGL support
// has to be disabled in plugins like xcb in this case since the native display,
// window and pixmap types will be different than what an X-based platform
// plugin would expect.
#include <EGL/egl.h>
#include <X11/Xlib.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
Display *dpy = EGL_DEFAULT_DISPLAY;
EGLNativeDisplayType egldpy = XOpenDisplay(\"\");
dpy = egldpy;
EGLNativeWindowType w = XCreateWindow(dpy, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
XDestroyWindow(dpy, w);
XCloseDisplay(dpy);
    /* END TEST: */
    return 0;
}
")

# egl-brcm
qt_config_compile_test(egl_brcm
    LABEL "Broadcom EGL (Raspberry Pi)"
    LIBRARIES
        EGL::EGL
    CODE
"
#include <EGL/egl.h>
#include <bcm_host.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
vc_dispmanx_display_open(0);
    /* END TEST: */
    return 0;
}
"# FIXME: use: unmapped library: bcm_host
)

# egl-egldevice
qt_config_compile_test(egl_egldevice
    LABEL "EGLDevice"
    LIBRARIES
        EGL::EGL
    CODE
"
#include <EGL/egl.h>
#include <EGL/eglext.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
EGLDeviceEXT device = 0;
EGLStreamKHR stream = 0;
EGLOutputLayerEXT layer = 0;
(void) EGL_DRM_CRTC_EXT;
    /* END TEST: */
    return 0;
}
")

# egl-mali
qt_config_compile_test(egl_mali
    LABEL "Mali EGL"
    LIBRARIES
        EGL::EGL
    CODE
"
#include <EGL/fbdev_window.h>
#include <EGL/egl.h>
#include <GLES2/gl2.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
fbdev_window *w = 0;
    /* END TEST: */
    return 0;
}
")

# egl-mali-2
qt_config_compile_test(egl_mali_2
    LABEL "Mali 2 EGL"
    LIBRARIES
        EGL::EGL
    CODE
"
#include <EGL/egl.h>
#include <GLES2/gl2.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
mali_native_window *w = 0;
    /* END TEST: */
    return 0;
}
")

# egl-viv
qt_config_compile_test(egl_viv
    LABEL "i.Mx6 EGL"
    LIBRARIES
        EGL::EGL
    CODE
"
#include <EGL/egl.h>
#include <EGL/eglvivante.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
#ifdef __INTEGRITY
fbGetDisplay();
#else
// Do not rely on fbGetDisplay(), since the signature has changed over time.
// Stick to fbGetDisplayByIndex().
fbGetDisplayByIndex(0);
#endif
    /* END TEST: */
    return 0;
}
"# FIXME: qmake: ['DEFINES += EGL_API_FB=1', '!integrity: DEFINES += LINUX=1']
)

# egl-openwfd
qt_config_compile_test(egl_openwfd
    LABEL "OpenWFD EGL"
    LIBRARIES
        EGL::EGL
    CODE
"
#include <wfd.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
wfdEnumerateDevices(nullptr, 0, nullptr);
    /* END TEST: */
    return 0;
}
")

# egl-rcar
qt_config_compile_test(egl_rcar
    LABEL "RCAR EGL"
    LIBRARIES
        EGL::EGL
        GLESv2::GLESv2
    CODE
"
#include <EGL/egl.h>
extern \"C\" {
extern unsigned long PVRGrfxServerInit(void);
}
int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
PVRGrfxServerInit();
    /* END TEST: */
    return 0;
}
")

# evdev
qt_config_compile_test(evdev
    LABEL "evdev"
    CODE
"#if defined(__FreeBSD__)
#  include <dev/evdev/input.h>
#else
#  include <linux/input.h>
#  include <linux/kd.h>
#endif
enum {
    e1 = ABS_PRESSURE,
    e2 = ABS_X,
    e3 = REL_X,
    e4 = SYN_REPORT,
};


int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
input_event buf[32];
(void) buf;
    /* END TEST: */
    return 0;
}
")

# integrityfb
qt_config_compile_test(integrityfb
    LABEL "INTEGRITY framebuffer"
    CODE
"
#include <device/fbdriver.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
FBDriver *driver = 0;
    /* END TEST: */
    return 0;
}
")

# linuxfb
qt_config_compile_test(linuxfb
    LABEL "LinuxFB"
    CODE
"
#include <linux/fb.h>
#include <sys/kd.h>
#include <sys/ioctl.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
fb_fix_screeninfo finfo;
fb_var_screeninfo vinfo;
int fd = 3;
ioctl(fd, FBIOGET_FSCREENINFO, &finfo);
ioctl(fd, FBIOGET_VSCREENINFO, &vinfo);
    /* END TEST: */
    return 0;
}
")

# opengles3
qt_config_compile_test(opengles3
    LABEL "OpenGL ES 3.0"
    LIBRARIES
        GLESv2::GLESv2
    CODE
"#ifdef __APPLE__
#  include <OpenGLES/ES3/gl.h>
#else
#  define GL_GLEXT_PROTOTYPES
#  include <GLES3/gl3.h>
#endif


int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
static GLfloat f[6];
glGetStringi(GL_EXTENSIONS, 0);
glReadBuffer(GL_COLOR_ATTACHMENT1);
glUniformMatrix2x3fv(0, 0, GL_FALSE, f);
glMapBufferRange(GL_ARRAY_BUFFER, 0, 0, GL_MAP_READ_BIT);
    /* END TEST: */
    return 0;
}
")

# opengles31
qt_config_compile_test(opengles31
    LABEL "OpenGL ES 3.1"
    LIBRARIES
        GLESv2::GLESv2
    CODE
"
#include <GLES3/gl31.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
glDispatchCompute(1, 1, 1);
glProgramUniform1i(0, 0, 0);
    /* END TEST: */
    return 0;
}
")

# opengles32
qt_config_compile_test(opengles32
    LABEL "OpenGL ES 3.2"
    LIBRARIES
        GLESv2::GLESv2
    CODE
"
#include <GLES3/gl32.h>

int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
glFramebufferTexture(GL_TEXTURE_2D, GL_DEPTH_STENCIL_ATTACHMENT, 1, 0);
    /* END TEST: */
    return 0;
}
")

# xcb_syslibs
qt_config_compile_test(xcb_syslibs
    LABEL "XCB (extensions)"
    LIBRARIES
        XCB::ICCCM
        XCB::IMAGE
        XCB::KEYSYMS
        XCB::RANDR
        XCB::RENDER
        XCB::RENDERUTIL
        XCB::SHAPE
        XCB::SHM
        XCB::SYNC
        XCB::XFIXES
        XCB::XINERAMA
        XCB::XKB
        XCB::XCB
    CODE
"// xkb.h is using a variable called 'explicit', which is a reserved keyword in C++
#define explicit dont_use_cxx_explicit
#include <xcb/xcb.h>
#include <xcb/xcb_image.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/randr.h>
#include <xcb/render.h>
#include <xcb/shape.h>
#include <xcb/shm.h>
#include <xcb/sync.h>
#include <xcb/xfixes.h>
#include <xcb/xinerama.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xcb_renderutil.h>
#include <xcb/xkb.h>
#undef explicit
int main(int argc, char **argv)
{
    (void)argc; (void)argv;
    /* BEGIN TEST: */
int primaryScreen = 0;
xcb_connection_t *c = xcb_connect(\"\", &primaryScreen);
/* RENDER */
xcb_generic_error_t *error = nullptr;
xcb_render_query_pict_formats_cookie_t formatsCookie =
    xcb_render_query_pict_formats(c);
xcb_render_query_pict_formats_reply_t *formatsReply =
    xcb_render_query_pict_formats_reply(c, formatsCookie, &error);
/* RENDERUTIL: xcb_renderutil.h include won't compile unless version >= 0.3.9 */
xcb_render_util_find_standard_format(nullptr, XCB_PICT_STANDARD_ARGB_32);
/* XKB: This takes more arguments in xcb-xkb < 1.11 */
xcb_xkb_get_kbd_by_name_replies_key_names_value_list_sizeof(nullptr, 0, 0, 0, 0, 0, 0, 0, 0);
    /* END TEST: */
    return 0;
}
")



#### Features

qt_feature("accessibility-atspi-bridge" PUBLIC PRIVATE
    LABEL "ATSPI Bridge"
    CONDITION QT_FEATURE_accessibility AND QT_FEATURE_xcb AND QT_FEATURE_dbus AND ATSPI2_FOUND
)
qt_feature_definition("accessibility-atspi-bridge" "QT_NO_ACCESSIBILITY_ATSPI_BRIDGE" NEGATE VALUE "1")
qt_feature("directfb" PRIVATE
    SECTION "Platform plugins"
    LABEL "DirectFB"
    AUTODETECT OFF
    CONDITION DirectFB_FOUND
)
qt_feature("directwrite" PRIVATE
    LABEL "DirectWrite"
    CONDITION libs.dwrite OR FIXME
    EMIT_IF WIN32
)
qt_feature("directwrite1" PRIVATE
    LABEL "DirectWrite 1"
    CONDITION libs.dwrite_1 OR FIXME
    EMIT_IF WIN32
)
qt_feature("directwrite3" PRIVATE
    LABEL "DirectWrite 3"
    CONDITION QT_FEATURE_directwrite1 AND libs.dwrite_3 OR FIXME
    EMIT_IF WIN32
)
qt_feature("directwrite2" PRIVATE
    LABEL "DirectWrite 2"
    CONDITION QT_FEATURE_directwrite1 AND libs.dwrite_2 OR FIXME
    EMIT_IF WIN32
)
qt_feature("direct2d" PRIVATE
    LABEL "Direct 2D"
    CONDITION WIN32 AND NOT WINRT AND libs.d2d1 OR FIXME
)
qt_feature("direct2d1_1" PRIVATE
    LABEL "Direct 2D 1.1"
    CONDITION QT_FEATURE_direct2d AND libs.d2d1_1 OR FIXME
)
qt_feature("evdev" PRIVATE
    LABEL "evdev"
    CONDITION QT_FEATURE_thread AND TEST_evdev
)
qt_feature("freetype" PUBLIC PRIVATE
    SECTION "Fonts"
    LABEL "FreeType"
    PURPOSE "Supports the FreeType 2 font engine (and its supported font formats)."
)
qt_feature_definition("freetype" "QT_NO_FREETYPE" NEGATE VALUE "1")
qt_feature("system-freetype" PRIVATE
    LABEL "  Using system FreeType"
    AUTODETECT NOT MSVC
    CONDITION QT_FEATURE_freetype AND WrapSystemFreetype_FOUND
    ENABLE INPUT_freetype STREQUAL 'system'
    DISABLE INPUT_freetype STREQUAL 'qt'
)
qt_feature("fontconfig" PUBLIC PRIVATE
    LABEL "Fontconfig"
    AUTODETECT NOT APPLE
    CONDITION NOT MSVC AND QT_FEATURE_system_freetype AND FONTCONFIG_FOUND
)
qt_feature_definition("fontconfig" "QT_NO_FONTCONFIG" NEGATE VALUE "1")
qt_feature("gbm"
    LABEL "GBM"
    CONDITION gbm_FOUND
)
qt_feature_config("gbm" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("harfbuzz" PUBLIC PRIVATE
    LABEL "HarfBuzz"
)
qt_feature_definition("harfbuzz" "QT_NO_HARFBUZZ" NEGATE VALUE "1")
qt_feature("system-harfbuzz" PRIVATE
    LABEL "  Using system HarfBuzz"
    AUTODETECT NOT APPLE AND NOT WIN32
    CONDITION QT_FEATURE_harfbuzz AND WrapSystemHarfbuzz_FOUND
    ENABLE INPUT_harfbuzz STREQUAL 'system'
    DISABLE INPUT_harfbuzz STREQUAL 'qt'
)
qt_feature("qqnx_imf" PRIVATE
    LABEL "IMF"
    CONDITION libs.imf OR FIXME
    EMIT_IF QNX
)
qt_feature("integrityfb" PRIVATE
    SECTION "Platform plugins"
    LABEL "INTEGRITY framebuffer"
    CONDITION INTEGRITY AND TEST_integrityfb
)
qt_feature("kms" PRIVATE
    LABEL "KMS"
    CONDITION Libdrm_FOUND
)
qt_feature_config("kms" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("drm_atomic" PRIVATE
    LABEL "DRM Atomic API"
    CONDITION Libdrm_FOUND AND TEST_drm_atomic
)
qt_feature("libinput" PRIVATE
    LABEL "libinput"
    CONDITION QT_FEATURE_libudev AND Libinput_FOUND
)
qt_feature("integrityhid" PRIVATE
    LABEL "INTEGRITY HID"
    CONDITION INTEGRITY AND libs.integrityhid OR FIXME
)
qt_feature("libinput-axis-api" PRIVATE
    LABEL "axis API in libinput"
    CONDITION QT_FEATURE_libinput AND ON
)
qt_feature("lgmon"
    LABEL "lgmon"
    CONDITION libs.lgmon OR FIXME
    EMIT_IF QNX
)
qt_feature_config("lgmon" QMAKE_PRIVATE_CONFIG)
qt_feature("linuxfb" PRIVATE
    SECTION "Platform plugins"
    LABEL "LinuxFB"
    CONDITION TEST_linuxfb AND QT_FEATURE_regularexpression
)
qt_feature("vsp2" PRIVATE
    LABEL "VSP2"
    AUTODETECT OFF
    CONDITION libs.v4l2 OR FIXME
)
qt_feature("vnc" PRIVATE
    SECTION "Platform plugins"
    LABEL "VNC"
    CONDITION ( UNIX AND NOT ANDROID AND NOT APPLE AND NOT WASM ) AND ( QT_FEATURE_regularexpression AND QT_FEATURE_network )
)
qt_feature("mtdev" PRIVATE
    LABEL "mtdev"
    CONDITION Mtdev_FOUND
)
qt_feature("opengles2" PUBLIC
    LABEL "OpenGL ES 2.0"
    CONDITION NOT WIN32 AND ( NOT WATCHOS AND NOT QT_FEATURE_opengl_desktop AND GLESv2_FOUND )
    ENABLE INPUT_opengl STREQUAL 'es2'
    DISABLE INPUT_opengl STREQUAL 'desktop' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
)
qt_feature_config("opengles2" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("opengles3" PUBLIC
    LABEL "OpenGL ES 3.0"
    CONDITION QT_FEATURE_opengles2 AND TEST_opengles3
)
qt_feature("opengles31" PUBLIC
    LABEL "OpenGL ES 3.1"
    CONDITION QT_FEATURE_opengles3 AND TEST_opengles31
)
qt_feature("opengles32" PUBLIC
    LABEL "OpenGL ES 3.2"
    CONDITION QT_FEATURE_opengles31 AND TEST_opengles32
)
qt_feature("opengl-dynamic"
    LABEL "Dynamic OpenGL"
    CONDITION WIN32 AND NOT WINRT
    DISABLE INPUT_opengl STREQUAL 'no' OR INPUT_opengl STREQUAL 'desktop'
)
qt_feature("dynamicgl" PUBLIC
    LABEL "Dynamic OpenGL: dynamicgl"
    CONDITION QT_FEATURE_opengl_dynamic
    DISABLE INPUT_opengl STREQUAL 'no' OR INPUT_opengl STREQUAL 'desktop'
)
qt_feature_definition("opengl-dynamic" "QT_OPENGL_DYNAMIC")
qt_feature("opengl-desktop"
    LABEL "Desktop OpenGL"
    CONDITION ( WIN32 AND NOT WINRT AND NOT QT_FEATURE_opengl_dynamic AND ( MSVC OR OpenGL_OpenGL_FOUND ) ) OR ( NOT WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_OpenGL_FOUND )
    ENABLE INPUT_opengl STREQUAL 'desktop'
    DISABLE INPUT_opengl STREQUAL 'es2' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
)
qt_feature("opengl" PUBLIC
    LABEL "OpenGL"
    CONDITION QT_FEATURE_opengl_desktop OR QT_FEATURE_opengl_dynamic OR QT_FEATURE_opengles2
)
qt_feature_definition("opengl" "QT_NO_OPENGL" NEGATE VALUE "1")
qt_feature("vkgen" PRIVATE
    LABEL "vkgen"
    CONDITION QT_FEATURE_xmlstreamreader
)
qt_feature("vulkan" PUBLIC
    LABEL "Vulkan"
    CONDITION QT_FEATURE_vkgen AND Vulkan_FOUND
)
qt_feature("openvg" PUBLIC
    LABEL "OpenVG"
    CONDITION libs.openvg OR FIXME
)
qt_feature("egl" PUBLIC PRIVATE
    LABEL "EGL"
    CONDITION ( QT_FEATURE_opengl OR QT_FEATURE_openvg ) AND ( EGL_FOUND ) AND ( QT_FEATURE_dlopen OR NOT UNIX OR INTEGRITY )
)
qt_feature_definition("egl" "QT_NO_EGL" NEGATE VALUE "1")
qt_feature("egl_x11" PRIVATE
    LABEL "EGL on X11"
    CONDITION QT_FEATURE_thread AND QT_FEATURE_egl AND TEST_egl_x11
)
qt_feature("eglfs" PRIVATE
    SECTION "Platform plugins"
    LABEL "EGLFS"
    CONDITION NOT ANDROID AND NOT APPLE AND NOT WIN32 AND NOT WASM AND QT_FEATURE_egl
)
qt_feature("eglfs_brcm" PRIVATE
    LABEL "EGLFS Raspberry Pi"
    CONDITION QT_FEATURE_eglfs AND TEST_egl_brcm
)
qt_feature("eglfs_egldevice" PRIVATE
    LABEL "EGLFS EGLDevice"
    CONDITION QT_FEATURE_eglfs AND TEST_egl_egldevice AND QT_FEATURE_kms
)
qt_feature("eglfs_gbm" PRIVATE
    LABEL "EGLFS GBM"
    CONDITION QT_FEATURE_eglfs AND gbm_FOUND AND QT_FEATURE_kms
)
qt_feature("eglfs_vsp2" PRIVATE
    LABEL "EGLFS VSP2"
    CONDITION QT_FEATURE_eglfs AND gbm_FOUND AND QT_FEATURE_kms AND QT_FEATURE_vsp2
)
qt_feature("eglfs_mali" PRIVATE
    LABEL "EGLFS Mali"
    CONDITION QT_FEATURE_eglfs AND ( TEST_egl_mali OR TEST_egl_mali_2 )
)
qt_feature("eglfs_viv" PRIVATE
    LABEL "EGLFS i.Mx6"
    CONDITION QT_FEATURE_eglfs AND TEST_egl_viv
)
qt_feature("eglfs_rcar" PRIVATE
    LABEL "EGLFS RCAR"
    CONDITION INTEGRITY AND QT_FEATURE_eglfs AND TEST_egl_rcar
)
qt_feature("eglfs_viv_wl" PRIVATE
    LABEL "EGLFS i.Mx6 Wayland"
    CONDITION QT_FEATURE_eglfs_viv AND Wayland_FOUND
)
qt_feature("eglfs_openwfd" PRIVATE
    LABEL "EGLFS OpenWFD"
    CONDITION INTEGRITY AND QT_FEATURE_eglfs AND TEST_egl_openwfd
)
qt_feature("eglfs_x11" PRIVATE
    LABEL "EGLFS X11"
    CONDITION QT_FEATURE_eglfs AND QT_FEATURE_xcb_xlib AND QT_FEATURE_egl_x11
)
qt_feature("gif" PRIVATE
    LABEL "GIF"
    CONDITION QT_FEATURE_imageformatplugin
)
qt_feature_definition("gif" "QT_NO_IMAGEFORMAT_GIF" NEGATE)
qt_feature("ico" PUBLIC PRIVATE
    LABEL "ICO"
    CONDITION QT_FEATURE_imageformatplugin
)
qt_feature_definition("ico" "QT_NO_ICO" NEGATE VALUE "1")
qt_feature("jpeg" PRIVATE
    LABEL "JPEG"
    CONDITION QT_FEATURE_imageformatplugin
    DISABLE INPUT_libjpeg STREQUAL 'no'
)
qt_feature_definition("jpeg" "QT_NO_IMAGEFORMAT_JPEG" NEGATE)
qt_feature("system-jpeg" PRIVATE
    LABEL "  Using system libjpeg"
    CONDITION QT_FEATURE_jpeg AND JPEG_FOUND
    ENABLE INPUT_libjpeg STREQUAL 'system'
    DISABLE INPUT_libjpeg STREQUAL 'qt'
)
qt_feature("png" PRIVATE
    LABEL "PNG"
    DISABLE INPUT_libpng STREQUAL 'no'
)
qt_feature_definition("png" "QT_NO_IMAGEFORMAT_PNG" NEGATE)
qt_feature("system-png" PRIVATE
    LABEL "  Using system libpng"
    AUTODETECT QT_FEATURE_system_zlib
    CONDITION QT_FEATURE_png AND WrapSystemPNG_FOUND
    ENABLE INPUT_libpng STREQUAL 'system'
    DISABLE INPUT_libpng STREQUAL 'qt'
)
qt_feature("sessionmanager" PUBLIC
    SECTION "Kernel"
    LABEL "Session Management"
    PURPOSE "Provides an interface to the windowing system's session management."
)
qt_feature_definition("sessionmanager" "QT_NO_SESSIONMANAGER" NEGATE VALUE "1")
qt_feature("tslib" PRIVATE
    LABEL "tslib"
    CONDITION Tslib_FOUND
)
qt_feature("tuiotouch" PRIVATE
    LABEL "TuioTouch"
    PURPOSE "Provides the TuioTouch input plugin."
    CONDITION QT_FEATURE_network AND QT_FEATURE_udpsocket
)
qt_feature("xcb" PRIVATE
    SECTION "Platform plugins"
    LABEL "XCB"
    AUTODETECT NOT APPLE
    CONDITION QT_FEATURE_thread AND TARGET XCB::XCB AND TEST_xcb_syslibs AND QT_FEATURE_xkbcommon_x11
)
qt_feature("xcb-glx-plugin" PRIVATE
    LABEL "GLX Plugin"
    CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
    EMIT_IF QT_FEATURE_xcb
)
qt_feature("xcb-glx" PRIVATE
    LABEL "  XCB GLX"
    CONDITION XCB_GLX_FOUND
    EMIT_IF QT_FEATURE_xcb AND QT_FEATURE_xcb_glx_plugin
)
qt_feature("xcb-egl-plugin" PRIVATE
    LABEL "EGL-X11 Plugin"
    CONDITION QT_FEATURE_egl_x11 AND QT_FEATURE_opengl
    EMIT_IF QT_FEATURE_xcb
)
qt_feature("xcb-native-painting" PRIVATE
    LABEL "Native painting (experimental)"
    AUTODETECT OFF
    CONDITION QT_FEATURE_xcb_xlib AND QT_FEATURE_fontconfig AND XRender_FOUND
    EMIT_IF QT_FEATURE_xcb
)
qt_feature("xrender" PRIVATE
    LABEL "XRender for native painting"
    CONDITION QT_FEATURE_xcb_native_painting
    EMIT_IF QT_FEATURE_xcb AND QT_FEATURE_xcb_native_painting
)
qt_feature("xcb-xlib" PRIVATE
    LABEL "XCB Xlib"
    CONDITION QT_FEATURE_xlib AND X11_XCB_FOUND
)
qt_feature("xcb-sm" PRIVATE
    LABEL "xcb-sm"
    CONDITION QT_FEATURE_sessionmanager AND X11_SM_FOUND
    EMIT_IF QT_FEATURE_xcb
)
qt_feature("system-xcb-xinput" PRIVATE
    LABEL "Using system-provided xcb-xinput"
    CONDITION XCB_XINPUT_FOUND
    ENABLE INPUT_bundled_xcb_xinput STREQUAL 'no'
    DISABLE INPUT_bundled_xcb_xinput STREQUAL 'yes'
    EMIT_IF QT_FEATURE_xcb
)
qt_feature("xkbcommon" PRIVATE
    LABEL "xkbcommon"
    CONDITION XKB_FOUND
)
qt_feature("xkbcommon-x11" PRIVATE
    LABEL "xkbcommon-x11"
    CONDITION QT_FEATURE_xkbcommon AND XKB_COMMON_X11_FOUND
)
qt_feature("xlib" PRIVATE
    LABEL "XLib"
    AUTODETECT NOT APPLE OR QT_FEATURE_xcb
    CONDITION X11_FOUND
)
qt_feature("texthtmlparser" PUBLIC
    SECTION "Kernel"
    LABEL "HtmlParser"
    PURPOSE "Provides a parser for HTML."
)
qt_feature_definition("texthtmlparser" "QT_NO_TEXTHTMLPARSER" NEGATE VALUE "1")
qt_feature("textmarkdownreader" PUBLIC
    SECTION "Kernel"
    LABEL "MarkdownReader"
    PURPOSE "Provides a Markdown (CommonMark and GitHub) reader"
    ENABLE INPUT_libmd4c STREQUAL 'system' OR INPUT_libmd4c STREQUAL 'qt' OR INPUT_libmd4c STREQUAL 'yes'
    DISABLE INPUT_libmd4c STREQUAL 'no'
)
qt_feature("system-textmarkdownreader" PUBLIC
    SECTION "Kernel"
    LABEL "  Using system libmd4c"
    CONDITION libs.libmd4c OR FIXME
    ENABLE INPUT_libmd4c STREQUAL 'system'
    DISABLE INPUT_libmd4c STREQUAL 'qt'
)
qt_feature("textmarkdownwriter" PUBLIC
    SECTION "Kernel"
    LABEL "MarkdownWriter"
    PURPOSE "Provides a Markdown (CommonMark) writer"
)
qt_feature("textodfwriter" PUBLIC
    SECTION "Kernel"
    LABEL "OdfWriter"
    PURPOSE "Provides an ODF writer."
    CONDITION QT_FEATURE_xmlstreamwriter
)
qt_feature_definition("textodfwriter" "QT_NO_TEXTODFWRITER" NEGATE VALUE "1")
qt_feature("cssparser" PUBLIC
    SECTION "Kernel"
    LABEL "CssParser"
    PURPOSE "Provides a parser for Cascading Style Sheets."
)
qt_feature_definition("cssparser" "QT_NO_CSSPARSER" NEGATE VALUE "1")
qt_feature("draganddrop" PUBLIC
    SECTION "Kernel"
    LABEL "Drag and Drop"
    PURPOSE "Supports the drag and drop mechansim."
    CONDITION QT_FEATURE_imageformat_xpm
)
qt_feature_definition("draganddrop" "QT_NO_DRAGANDDROP" NEGATE VALUE "1")
qt_feature("action" PUBLIC
    SECTION "Kernel"
    LABEL "Q(Gui)Action(Group)"
    PURPOSE "Provides abstract user interface actions."
)
qt_feature_definition("action" "QT_NO_ACTION" NEGATE VALUE "1")
qt_feature("cursor" PUBLIC
    SECTION "Kernel"
    LABEL "QCursor"
    PURPOSE "Provides mouse cursors."
)
qt_feature_definition("cursor" "QT_NO_CURSOR" NEGATE VALUE "1")
qt_feature("clipboard" PUBLIC
    SECTION "Kernel"
    LABEL "QClipboard"
    PURPOSE "Provides cut and paste operations."
    CONDITION NOT INTEGRITY AND NOT QNX AND NOT rtems
)
qt_feature_definition("clipboard" "QT_NO_CLIPBOARD" NEGATE VALUE "1")
qt_feature("wheelevent" PUBLIC
    SECTION "Kernel"
    LABEL "QWheelEvent"
    PURPOSE "Supports wheel events."
)
qt_feature_definition("wheelevent" "QT_NO_WHEELEVENT" NEGATE VALUE "1")
qt_feature("tabletevent" PUBLIC
    SECTION "Kernel"
    LABEL "QTabletEvent"
    PURPOSE "Supports tablet events."
)
qt_feature_definition("tabletevent" "QT_NO_TABLETEVENT" NEGATE VALUE "1")
qt_feature("im" PUBLIC
    SECTION "Kernel"
    LABEL "QInputContext"
    PURPOSE "Provides complex input methods."
    CONDITION QT_FEATURE_library
)
qt_feature_definition("im" "QT_NO_IM" NEGATE VALUE "1")
qt_feature("highdpiscaling" PUBLIC
    SECTION "Kernel"
    LABEL "High DPI Scaling"
    PURPOSE "Provides automatic scaling of DPI-unaware applications on high-DPI displays."
)
qt_feature_definition("highdpiscaling" "QT_NO_HIGHDPISCALING" NEGATE VALUE "1")
qt_feature("validator" PUBLIC
    SECTION "Widgets"
    LABEL "QValidator"
    PURPOSE "Supports validation of input text."
)
qt_feature_definition("validator" "QT_NO_VALIDATOR" NEGATE VALUE "1")
qt_feature("standarditemmodel" PUBLIC
    SECTION "ItemViews"
    LABEL "QStandardItemModel"
    PURPOSE "Provides a generic model for storing custom data."
    CONDITION QT_FEATURE_itemmodel
)
qt_feature_definition("standarditemmodel" "QT_NO_STANDARDITEMMODEL" NEGATE VALUE "1")
qt_feature("imageformatplugin" PUBLIC
    SECTION "Images"
    LABEL "QImageIOPlugin"
    PURPOSE "Provides a base for writing a image format plugins."
)
qt_feature_definition("imageformatplugin" "QT_NO_IMAGEFORMATPLUGIN" NEGATE VALUE "1")
qt_feature("movie" PUBLIC
    SECTION "Images"
    LABEL "QMovie"
    PURPOSE "Supports animated images."
)
qt_feature_definition("movie" "QT_NO_MOVIE" NEGATE VALUE "1")
qt_feature("imageformat_bmp" PUBLIC
    SECTION "Images"
    LABEL "BMP Image Format"
    PURPOSE "Supports Microsoft's Bitmap image file format."
)
qt_feature_definition("imageformat_bmp" "QT_NO_IMAGEFORMAT_BMP" NEGATE VALUE "1")
qt_feature("imageformat_ppm" PUBLIC
    SECTION "Images"
    LABEL "PPM Image Format"
    PURPOSE "Supports the Portable Pixmap image file format."
)
qt_feature_definition("imageformat_ppm" "QT_NO_IMAGEFORMAT_PPM" NEGATE VALUE "1")
qt_feature("imageformat_xbm" PUBLIC
    SECTION "Images"
    LABEL "XBM Image Format"
    PURPOSE "Supports the X11 Bitmap image file format."
)
qt_feature_definition("imageformat_xbm" "QT_NO_IMAGEFORMAT_XBM" NEGATE VALUE "1")
qt_feature("imageformat_xpm" PUBLIC
    SECTION "Images"
    LABEL "XPM Image Format"
    PURPOSE "Supports the X11 Pixmap image file format."
)
qt_feature_definition("imageformat_xpm" "QT_NO_IMAGEFORMAT_XPM" NEGATE VALUE "1")
qt_feature("imageformat_png" PUBLIC
    SECTION "Images"
    LABEL "PNG Image Format"
    PURPOSE "Supports the Portable Network Graphics image file format."
)
qt_feature_definition("imageformat_png" "QT_NO_IMAGEFORMAT_PNG" NEGATE VALUE "1")
qt_feature("imageformat_jpeg" PUBLIC
    SECTION "Images"
    LABEL "JPEG Image Format"
    PURPOSE "Supports the Joint Photographic Experts Group image file format."
)
qt_feature_definition("imageformat_jpeg" "QT_NO_IMAGEFORMAT_JPEG" NEGATE VALUE "1")
qt_feature("image_heuristic_mask" PUBLIC
    SECTION "Images"
    LABEL "QImage::createHeuristicMask()"
    PURPOSE "Supports creating a 1-bpp heuristic mask for images."
)
qt_feature_definition("image_heuristic_mask" "QT_NO_IMAGE_HEURISTIC_MASK" NEGATE VALUE "1")
qt_feature("image_text" PUBLIC
    SECTION "Images"
    LABEL "Image Text"
    PURPOSE "Supports image file text strings."
)
qt_feature_definition("image_text" "QT_NO_IMAGE_TEXT" NEGATE VALUE "1")
qt_feature("picture" PUBLIC
    SECTION "Painting"
    LABEL "QPicture"
    PURPOSE "Supports recording and replaying QPainter commands."
)
qt_feature_definition("picture" "QT_NO_PICTURE" NEGATE VALUE "1")
qt_feature("colornames" PUBLIC
    SECTION "Painting"
    LABEL "Color Names"
    PURPOSE "Supports color names such as \"red\", used by QColor and by some HTML documents."
)
qt_feature_definition("colornames" "QT_NO_COLORNAMES" NEGATE VALUE "1")
qt_feature("pdf" PUBLIC
    SECTION "Painting"
    LABEL "QPdf"
    PURPOSE "Provides a PDF backend for QPainter."
    CONDITION QT_FEATURE_temporaryfile
)
qt_feature_definition("pdf" "QT_NO_PDF" NEGATE VALUE "1")
qt_feature("desktopservices" PUBLIC
    SECTION "Utilities"
    LABEL "QDesktopServices"
    PURPOSE "Provides methods for accessing common desktop services."
)
qt_feature_definition("desktopservices" "QT_NO_DESKTOPSERVICES" NEGATE VALUE "1")
qt_feature("systemtrayicon" PUBLIC
    SECTION "Utilities"
    LABEL "QSystemTrayIcon"
    PURPOSE "Provides an icon for an application in the system tray."
    CONDITION QT_FEATURE_temporaryfile
)
qt_feature_definition("systemtrayicon" "QT_NO_SYSTEMTRAYICON" NEGATE VALUE "1")
qt_feature("accessibility" PUBLIC
    SECTION "Utilities"
    LABEL "Accessibility"
    PURPOSE "Provides accessibility support."
    CONDITION QT_FEATURE_properties
)
qt_feature_definition("accessibility" "QT_NO_ACCESSIBILITY" NEGATE VALUE "1")
qt_feature("multiprocess" PRIVATE
    SECTION "Utilities"
    LABEL "Multi process"
    PURPOSE "Provides support for detecting the desktop environment, launching external processes and opening URLs."
    CONDITION NOT INTEGRITY AND NOT rtems
)
qt_feature("whatsthis" PUBLIC
    SECTION "Widget Support"
    LABEL "QWhatsThis"
    PURPOSE "Supports displaying \"What's this\" help."
)
qt_feature_definition("whatsthis" "QT_NO_WHATSTHIS" NEGATE VALUE "1")
qt_feature("raster-64bit" PRIVATE
    SECTION "Painting"
    LABEL "QPainter - 64 bit raster"
    PURPOSE "Internal painting support for 64 bit (16 bpc) rasterization."
)
qt_feature("undocommand" PUBLIC
    SECTION "Utilities"
    LABEL "QUndoCommand"
    PURPOSE "Applies (redo or) undo of a single change in a document."
)
qt_feature_definition("undocommand" "QT_NO_UNDOCOMMAND" NEGATE VALUE "1")
qt_feature("undostack" PUBLIC
    SECTION "Utilities"
    LABEL "QUndoStack"
    PURPOSE "Provides the ability to (redo or) undo a list of changes in a document."
    CONDITION QT_FEATURE_undocommand
)
qt_feature_definition("undostack" "QT_NO_UNDOSTACK" NEGATE VALUE "1")
qt_feature("undogroup" PUBLIC
    SECTION "Utilities"
    LABEL "QUndoGroup"
    PURPOSE "Provides the ability to cluster QUndoCommands."
    CONDITION QT_FEATURE_undostack
)
qt_feature_definition("undogroup" "QT_NO_UNDOGROUP" NEGATE VALUE "1")
qt_configure_add_summary_section(NAME "Qt Gui")
qt_configure_add_summary_entry(ARGS "accessibility")
qt_configure_add_summary_entry(ARGS "freetype")
qt_configure_add_summary_entry(ARGS "system-freetype")
qt_configure_add_summary_entry(ARGS "harfbuzz")
qt_configure_add_summary_entry(ARGS "system-harfbuzz")
qt_configure_add_summary_entry(ARGS "fontconfig")
qt_configure_add_summary_section(NAME "Image formats")
qt_configure_add_summary_entry(ARGS "gif")
qt_configure_add_summary_entry(ARGS "ico")
qt_configure_add_summary_entry(ARGS "jpeg")
qt_configure_add_summary_entry(ARGS "system-jpeg")
qt_configure_add_summary_entry(ARGS "png")
qt_configure_add_summary_entry(ARGS "system-png")
qt_configure_end_summary_section() # end of "Image formats" section
qt_configure_add_summary_section(NAME "Text formats")
qt_configure_add_summary_entry(ARGS "texthtmlparser")
qt_configure_add_summary_entry(ARGS "cssparser")
qt_configure_add_summary_entry(ARGS "textodfwriter")
qt_configure_add_summary_entry(ARGS "textmarkdownreader")
qt_configure_add_summary_entry(ARGS "system-textmarkdownreader")
qt_configure_add_summary_entry(ARGS "textmarkdownwriter")
qt_configure_end_summary_section() # end of "Text formats" section
qt_configure_add_summary_entry(ARGS "egl")
qt_configure_add_summary_entry(ARGS "openvg")
qt_configure_add_summary_section(NAME "OpenGL")
qt_configure_add_summary_entry(ARGS "opengl-desktop")
qt_configure_add_summary_entry(
    ARGS "opengl-dynamic"
    CONDITION WIN32
)
qt_configure_add_summary_entry(
    ARGS "opengles2"
    CONDITION NOT WIN32)
qt_configure_add_summary_entry(
    ARGS "opengles3"
    CONDITION NOT WIN32)
qt_configure_add_summary_entry(
    ARGS "opengles31"
    CONDITION NOT WIN32)
qt_configure_add_summary_entry(
    ARGS "opengles32"
    CONDITION NOT WIN32)
qt_configure_end_summary_section() # end of "OpenGL" section
qt_configure_add_summary_entry(ARGS "vulkan")
qt_configure_add_summary_entry(ARGS "sessionmanager")
qt_configure_end_summary_section() # end of "Qt Gui" section
qt_configure_add_summary_section(NAME "Features used by QPA backends")
qt_configure_add_summary_entry(ARGS "evdev")
qt_configure_add_summary_entry(ARGS "libinput")
qt_configure_add_summary_entry(ARGS "integrityhid")
qt_configure_add_summary_entry(ARGS "mtdev")
qt_configure_add_summary_entry(ARGS "tslib")
qt_configure_add_summary_entry(ARGS "xkbcommon")
qt_configure_add_summary_section(NAME "X11 specific")
qt_configure_add_summary_entry(ARGS "xlib")
qt_configure_add_summary_entry(ARGS "xcb-xlib")
qt_configure_add_summary_entry(ARGS "egl_x11")
qt_configure_add_summary_entry(ARGS "xkbcommon-x11")
qt_configure_end_summary_section() # end of "X11 specific" section
qt_configure_end_summary_section() # end of "Features used by QPA backends" section
qt_configure_add_summary_section(NAME "QPA backends")
qt_configure_add_summary_entry(ARGS "directfb")
qt_configure_add_summary_entry(ARGS "eglfs")
qt_configure_add_summary_section(NAME "EGLFS details")
qt_configure_add_summary_entry(ARGS "eglfs_openwfd")
qt_configure_add_summary_entry(ARGS "eglfs_viv")
qt_configure_add_summary_entry(ARGS "eglfs_viv_wl")
qt_configure_add_summary_entry(ARGS "eglfs_rcar")
qt_configure_add_summary_entry(ARGS "eglfs_egldevice")
qt_configure_add_summary_entry(ARGS "eglfs_gbm")
qt_configure_add_summary_entry(ARGS "eglfs_vsp2")
qt_configure_add_summary_entry(ARGS "eglfs_mali")
qt_configure_add_summary_entry(ARGS "eglfs_brcm")
qt_configure_add_summary_entry(ARGS "eglfs_x11")
qt_configure_end_summary_section() # end of "EGLFS details" section
qt_configure_add_summary_entry(ARGS "linuxfb")
qt_configure_add_summary_entry(ARGS "vnc")
qt_configure_add_summary_entry(
    ARGS "integrityfb"
    CONDITION INTEGRITY
)
qt_configure_add_summary_section(NAME "QNX")
qt_configure_add_summary_entry(ARGS "lgmon")
qt_configure_add_summary_entry(ARGS "qqnx_imf")
qt_configure_end_summary_section() # end of "QNX" section
qt_configure_add_summary_section(NAME "XCB")
qt_configure_add_summary_entry(ARGS "system-xcb-xinput")
qt_configure_add_summary_entry(ARGS "xcb-native-painting")
qt_configure_add_summary_section(NAME "GL integrations")
qt_configure_add_summary_entry(ARGS "xcb-glx-plugin")
qt_configure_add_summary_entry(ARGS "xcb-glx")
qt_configure_add_summary_entry(ARGS "xcb-egl-plugin")
qt_configure_end_summary_section() # end of "GL integrations" section
qt_configure_end_summary_section() # end of "XCB" section
qt_configure_add_summary_section(NAME "Windows")
qt_configure_add_summary_entry(ARGS "direct2d")
qt_configure_add_summary_entry(ARGS "directwrite")
qt_configure_add_summary_entry(ARGS "directwrite2")
qt_configure_end_summary_section() # end of "Windows" section
qt_configure_end_summary_section() # end of "QPA backends" section
qt_configure_add_report_entry(
    TYPE NOTE
    MESSAGE "XCB support on macOS is minimal and untested. Some features will not work properly or at all (e.g. OpenGL, desktop services or accessibility), or may depend on your system and XQuartz setup."
    CONDITION QT_FEATURE_xcb AND APPLE
)
qt_configure_add_report_entry(
    TYPE NOTE
    MESSAGE "Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing."
    CONDITION QT_FEATURE_accessibility AND QT_FEATURE_xcb AND NOT QT_FEATURE_accessibility_atspi_bridge
)
qt_configure_add_report_entry(
    TYPE WARNING
    MESSAGE "The [-no]-qpa-platform-guard argument is deprecated and has no effect."
    CONDITION ( NOT INPUT_qpa_platform_guard STREQUAL '' )
)
qt_configure_add_report_entry(
    TYPE WARNING
    MESSAGE "No QPA platform plugin enabled! This will produce a Qt that cannot run GUI applications.  See \"Platform backends\" in the output of --help."
    CONDITION QT_FEATURE_gui AND LINUX AND NOT ANDROID AND NOT QT_FEATURE_xcb AND NOT QT_FEATURE_eglfs AND NOT QT_FEATURE_directfb AND NOT QT_FEATURE_linuxfb
)
qt_configure_add_report_entry(
    TYPE WARNING
    MESSAGE "On OS X, AAT is supported only with -qt-harfbuzz."
    CONDITION APPLE AND QT_FEATURE_system_harfbuzz
)
qt_configure_add_report_entry(
    TYPE ERROR
    MESSAGE "The OpenGL functionality tests failed!  You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2], QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform."
    CONDITION QT_FEATURE_gui AND NOT WATCHOS AND ( NOT INPUT_opengl STREQUAL 'no' ) AND NOT QT_FEATURE_opengl_desktop AND NOT QT_FEATURE_opengles2 AND NOT QT_FEATURE_opengl_dynamic
)
qt_configure_add_report_entry(
    TYPE WARNING
    MESSAGE "Accessibility disabled. This configuration of Qt is unsupported."
    CONDITION NOT QT_FEATURE_accessibility
)
qt_configure_add_report_entry(
    TYPE ERROR
    MESSAGE "XCB plugin requires xkbcommon and xkbcommon-x11, but -no-xkbcommon was provided."
    CONDITION ( NOT INPUT_xcb STREQUAL '' ) AND ( NOT INPUT_xcb STREQUAL 'no' ) AND INPUT_xkbcommon STREQUAL 'no'
)