1ECM-FIND-MODULES(7)           Extra CMake Modules          ECM-FIND-MODULES(7)
2
3
4

NAME

6       ecm-find-modules - ECM Find Modules Reference
7

INTRODUCTION

9       Find  modules  are used by the CMake find_package command to search for
10       packages that do not provide their  own  CMake  package  config  files.
11       CMake  provides  an extensive set of find modules, and Extra CMake Mod‐
12       ules (ECM) adds to that.
13
14       To use ECM’s find modules, you need to tell CMake to find the ECM pack‐
15       age,  and  then add either ${ECM_MODULE_PATH} or ${ECM_FIND_MODULE_DIR}
16       to the CMAKE_MODULE_PATH variable:
17
18          find_package(ECM REQUIRED NO_MODULE)
19          set(CMAKE_MODULE_PATH ${ECM_FIND_MODULE_DIR})
20
21       Using ${ECM_MODULE_PATH} will also make the modules intended for direct
22       use    by    CMake    scripts   available   (see   ecm-modules(7)   and
23       ecm-kde-modules(7)).
24
25       You  can  also  make  local  copies   of   find   modules   using   the
26       ecm_use_find_modules function from ECMUseFindModules, which is automat‐
27       ically included when ECM is found:
28
29          find_package(ECM REQUIRED NO_MODULE)
30          ecm_use_find_modules(
31              DIR "${CMAKE_BINARY_DIR}/cmake"
32              MODULES FindEGL.cmake
33          )
34          set(CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/cmake")
35
36       This allows selective use of ECM’s find modules,  and  the  NO_OVERRIDE
37       argument  can  be used to ensure that if CMake ships its own version of
38       that find module, it will be used instead.
39

ALL FIND MODULES

41   Find7z
42       Try to find 7z.
43
44       If the 7z executable is not in your PATH, you can provide  an  alterna‐
45       tive name or full path location with the 7z_EXECUTABLE variable.
46
47       This will define the following variables:
48
49       7z_FOUND
50              TRUE if 7z is available
51
52       7z_EXECUTABLE
53              Path to 7z executable
54
55       If 7z_FOUND is TRUE, it will also define the following imported target:
56
57       7z::7z Path to 7z executable
58
59       Since 5.85.0.
60
61   FindCanberra
62       Try to find Canberra event sound library.
63
64       This will define the following variables:
65
66       Canberra_FOUND
67              True if (the requested version of) Canberra is available
68
69       Canberra_VERSION
70              The version of Canberra
71
72       Canberra_LIBRARIES
73              The libraries of Canberra for use with target_link_libraries()
74
75       Canberra_INCLUDE_DIRS
76              The  include dirs of Canberra for use with target_include_direc‐
77              tories()
78
79       If Canberra_FOUND is TRUE, it will also define the  following  imported
80       target:
81
82       Canberra::Canberra
83              The Canberra library
84
85       In  general  we recommend using the imported target, as it is easier to
86       use.  Bear in mind, however, that if the target is in the  link  inter‐
87       face  of  an exported library, it must be made available by the package
88       config file.
89
90       Since 5.56.0.
91
92   FindEGL
93       Try to find EGL.
94
95       This will define the following variables:
96
97       EGL_FOUND
98              True if (the requested version of) EGL is available
99
100       EGL_VERSION
101              The version of EGL; note that this is the API version defined in
102              the  headers, rather than the version of the implementation (eg:
103              Mesa)
104
105       EGL_LIBRARIES
106              This can be passed to  target_link_libraries()  instead  of  the
107              EGL::EGL target
108
109       EGL_INCLUDE_DIRS
110              This  should  be  passed  to target_include_directories() if the
111              target is not used for linking
112
113       EGL_DEFINITIONS
114              This should be passed to target_compile_options() if the  target
115              is not used for linking
116
117       If  EGL_FOUND  is TRUE, it will also define the following imported tar‐
118       get:
119
120       EGL::EGL
121              The EGL library
122
123       In general we recommend using the imported target, as it is  easier  to
124       use.   Bear  in mind, however, that if the target is in the link inter‐
125       face of an exported library, it must be made available by  the  package
126       config file.
127
128       Since pre-1.0.0.
129
130   FindGLIB2
131       Try  to  locate the GLib2 library.  If found, this will define the fol‐
132       lowing variables:
133
134       GLIB2_FOUND
135              True if the GLib2 library is available
136
137       GLIB2_INCLUDE_DIRS
138              The GLib2 include directories
139
140       GLIB2_LIBRARIES
141              The GLib2 libraries for linking
142
143       GLIB2_INCLUDE_DIR
144              Deprecated, use GLIB2_INCLUDE_DIRS
145
146       GLIB2_LIBRARY
147              Deprecated, use GLIB2_LIBRARIES
148
149       If GLIB2_FOUND is TRUE, it will also define the following imported tar‐
150       get:
151
152       GLIB2::GLIB2
153              The GLIB2 library
154
155       Since 5.41.0.
156
157   FindGperf
158       Try to find GNU gperf.
159
160       If  the gperf executable is not in your PATH, you can provide an alter‐
161       native name or full path location with the Gperf_EXECUTABLE variable.
162
163       This will define the following variables:
164
165       Gperf_FOUND
166              True if gperf is available.
167
168       Gperf_EXECUTABLE
169              The gperf executable.
170
171       Gperf_VERSION
172              The gperf version. (since 5.85)
173
174       If Gperf_FOUND is TRUE, it will also define the following imported tar‐
175       get:
176
177       GPerf::Gperf
178              The gperf executable.
179
180       and the following public function:
181
182          ecm_gperf_generate(<GperfInput> <OutputFile> <OutputVariable(|target (since 5.83))>
183                             [GENERATION_FLAGS <flags>])
184
185       Run  gperf  on  <GperfInput> to generate <OutputFile>, adding it to the
186       <OutputVariable> variable which contains  the  source  for  the  target
187       where <OutputFile> is going to be built or, since KF 5.83, if the given
188       argument is a target, to the list of private sources  of  that  target.
189       The target must not be an alias. The optional GENERATION_FLAGS argument
190       is needed to pass extra parameters to gperf (note you  cannot  override
191       that way the output file).
192
193       A simple invocation would be:
194
195          ecm_gperf_generate(simple.gperf ${CMAKE_CURRENT_BINARY_DIR}/simple.h MySources)
196
197       Since 5.35.0.
198
199   FindGradle
200       Provides the ability to build Android AAR libraries using Gradle.
201
202       This relies on the Qt provided Gradle, so a Qt for Android installation
203       is required.
204
205          gradle_add_aar(<target>
206                         BUIDLFILE build.gradle
207                         NAME <aar-name>)
208
209       This builds an Android AAR library using the given build.gradle file.
210
211          gradle_install_aar(<target>
212                             DESTINATION <dest>)
213
214       Installs a  Android  AAR  library  that  has  been  created  with  gra‐
215       dle_add_aar.
216
217       Since 5.76.0.
218
219   FindIcoTool
220       Try to find icotool.
221
222       If  the  icotool executable is not in your PATH, you can provide an al‐
223       ternative name or full path location with the IcoTool_EXECUTABLE  vari‐
224       able.
225
226       This will define the following variables:
227
228       IcoTool_FOUND
229              True if icotool is available.
230
231       IcoTool_EXECUTABLE
232              The icotool executable.
233
234       If  IcoTool_FOUND  is  TRUE, it will also define the following imported
235       target:
236
237       IcoTool::IcoTool
238              The icotool executable.
239
240       Since 5.49.
241
242   FindInotify
243       Try to find inotify on this system. This finds:
244
245              • libinotify on Unix like systems, or
246
247              • the kernel’s inotify on Linux systems.
248
249       This will define the following variables:
250
251       Inotify_FOUND
252              True if inotify is available
253
254       Inotify_LIBRARIES
255              This has to be passed to target_link_libraries()
256
257       Inotify_INCLUDE_DIRS
258              This has to be passed to target_include_directories()
259
260       On Linux and SunOS, the libraries and include  directories  are  empty,
261       even  though  Inotify_FOUND may be set to TRUE. This is because no spe‐
262       cial includes or libraries are needed. On other systems  these  may  be
263       needed to use inotify.
264
265       Since 5.32.0.
266
267   FindIsoCodes
268       Try to find iso-codes data files.  Once done this will define:
269
270       IsoCodes_FOUND
271              Whether the system has iso-codes
272
273       IsoCodes_PREFIX
274              The location in which the iso-codes data files are found
275
276       IsoCodes_DOMAINS
277              The available domains provided by iso-codes
278
279       Since 5.80.0.
280
281   FindKF5
282       Find KDE Frameworks 5 with a single find_package() call.
283
284       This  will  use  the  package  config  files provided by the individual
285       frameworks.  For example, if you wish to find KArchive, which  presents
286       itself  to  CMake  as  KF5Archive (ie: you would do find_package(KF5Ar‐
287       chive) to find it directly), you can do
288
289          find_package(KF5 COMPONENTS Archive)
290
291       If all the required components (those given in the COMPONENTS argument,
292       but  not  those  given  in the OPTIONAL_COMPONENTS argument) are found,
293       KF5_FOUND will be set to true. Otherwise, it will be set to false.
294
295       Since pre-1.0.0.
296
297   FindLibExiv2
298       Try to find the Exiv2 library.
299
300       This will define the following variables:
301
302       LibExiv2_FOUND
303              True if (the requested version of) Exiv2 is available
304
305       LibExiv2_VERSION
306              The version of Exiv2
307
308       LibExiv2_INCLUDE_DIRS
309              The include dirs of Exiv2 for use  with  target_include_directo‐
310              ries()
311
312       LibExiv2_LIBRARIES
313              The  Exiv2  library  for use with target_link_libraries().  This
314              can  be  passed  to  target_link_libraries()  instead   of   the
315              LibExiv2::LibExiv2 target
316
317       If  LibExiv2_FOUND  is TRUE, it will also define the following imported
318       target:
319
320       LibExiv2::LibExiv2
321              The Exiv2 library
322
323       In general we recommend using the imported target, as it is  easier  to
324       use.   Bear  in mind, however, that if the target is in the link inter‐
325       face of an exported library, it must be made available by  the  package
326       config file.
327
328       Since 5.53.0.
329
330   FindLibGit2
331       Try to find libgit2 on a Unix system.
332
333       This will define the following variables:
334
335       LIBGIT2_FOUND
336              True if (the requested version of) libgit2 is available
337
338       LIBGIT2_VERSION
339              The version of libgit2
340
341       LIBGIT2_LIBRARIES
342              This  can  be  passed  to target_link_libraries() instead of the
343              LibGit2::LibGit2 target
344
345       LIBGIT2_INCLUDE_DIRS
346              This should be passed  to  target_include_directories()  if  the
347              target is not used for linking
348
349       LIBGIT2_DEFINITIONS
350              This  should be passed to target_compile_options() if the target
351              is not used for linking
352
353       If LIBGIT2_FOUND is TRUE, it will also define  the  following  imported
354       target:
355
356       LibGit2::LibGit2
357              The libgit2 library
358
359       In  general  we recommend using the imported target, as it is easier to
360       use.  Bear in mind, however, that if the target is in the  link  inter‐
361       face  of  an exported library, it must be made available by the package
362       config file.
363
364       Since 1.3.0.
365
366   FindLibMount
367       Try to find the libmount library (part of util-linux), once  done  this
368       will define:
369
370       LibMount_FOUND
371              LibMount was found on the system.
372
373       LibMount_INCLUDE_DIRS
374              The libmount include directory.
375
376       LibMount_LIBRARIES
377              The libmount libraries.
378
379       LibMount_VERSION
380              The libmount version.
381
382       If  LibMount_FOUND  is TRUE, it will also define the following imported
383       target:
384
385       LibMount::LibMount
386              The libmount library
387
388       Since 5.83.0
389
390   FindLibcap
391       Try to find the setcap binary and cap libraries
392
393       This will define:
394
395       Libcap_FOUND
396              system has the cap library and setcap binary
397
398       Libcap_LIBRARIES
399              cap libraries to link against
400
401       SETCAP_EXECUTABLE
402              path of the setcap binary
403
404       In addition, the following targets are defined:
405              Libcap::SetCapabilities
406
407       Since 5.80.0
408
409   FindOpenEXR
410       Try to find the OpenEXR libraries.
411
412       This will define the following variables:
413
414       OpenEXR_FOUND
415              True if OpenEXR is available
416
417       OpenEXR_LIBRARIES
418              Link to these to use OpenEXR
419
420       OpenEXR_INCLUDE_DIRS
421              Include directory for OpenEXR
422
423       OpenEXR_DEFINITIONS
424              Compiler flags required to link against OpenEXR
425
426       and the following imported targets:
427
428       OpenEXR::IlmImf
429              The OpenEXR core library
430
431       In general we recommend using the imported target, as it is  easier  to
432       use.   Bear  in mind, however, that if the target is in the link inter‐
433       face of an exported library, it must be made available by  the  package
434       config file.
435
436       Since pre-1.0.0.
437
438   FindPhoneNumber
439       Try to find PhoneNumber.
440
441       This  is  a  component-based find module, which makes use of the COMPO‐
442       NENTS and OPTIONAL_COMPONENTS arguments to find_module.  The  following
443       components are available:
444
445          PhoneNumber  GeoCoding
446
447       If no components are specified, this module will act as though all com‐
448       ponents were passed to OPTIONAL_COMPONENTS.
449
450       This module will define the following variables, independently  of  the
451       components searched for or found:
452
453       PhoneNumber_FOUND
454              True if (the requestion version of) PhoneNumber is available
455
456       For each searched-for components, PhoneNumber_<component>_FOUND will be
457       set to TRUE if the corresponding library was found,  and  FALSE  other‐
458       wise.   If  PhoneNumber_<component>_FOUND  is TRUE, the imported target
459       PhoneNumber::<component> will be defined.
460
461       Since 5.54.0.
462
463   FindPoppler
464       Try to find Poppler.
465
466       This is a component-based find module, which makes use  of  the  COMPO‐
467       NENTS  and OPTIONAL_COMPONENTS arguments to find_module.  The following
468       components are available:
469
470          Core  Cpp  Qt5  Qt4  Glib
471
472       If no components are specified, this module will act as though all com‐
473       ponents were passed to OPTIONAL_COMPONENTS.
474
475       This  module  will define the following variables, independently of the
476       components searched for or found:
477
478       Poppler_FOUND
479              TRUE if (the requested version of) Poppler is available
480
481       Poppler_VERSION
482              Found Poppler version
483
484       Poppler_TARGETS
485              A list of all targets imported by this module (note  that  there
486              may be more than the components that were requested)
487
488       Poppler_LIBRARIES
489              This can be passed to target_link_libraries() instead of the im‐
490              ported targets
491
492       Poppler_INCLUDE_DIRS
493              This should be passed  to  target_include_directories()  if  the
494              targets are not used for linking
495
496       Poppler_DEFINITIONS
497              This should be passed to target_compile_options() if the targets
498              are not used for linking
499
500       For each searched-for components, Poppler_<component>_FOUND will be set
501       to  TRUE if the corresponding Poppler library was found, and FALSE oth‐
502       erwise.  If Poppler_<component>_FOUND is TRUE, the imported target Pop‐
503       pler::<component>  will  be  defined.  This module will also attempt to
504       determine Poppler_*_VERSION variables for  each  imported  target,  al‐
505       though Poppler_VERSION should normally be sufficient.
506
507       In  general we recommend using the imported targets, as they are easier
508       to use and provide more control.  Bear in mind, however,  that  if  any
509       target is in the link interface of an exported library, it must be made
510       available by the package config file.
511
512       Since 5.19
513
514   FindPulseAudio
515       Try to locate the PulseAudio library.  If found, this will  define  the
516       following variables:
517
518       PulseAudio_FOUND
519              True  if  the  system has the PulseAudio library of at least the
520              minimum version specified by either  the  version  parameter  to
521              find_package() or the variable PulseAudio_MINIMUM_VERSION
522
523       PulseAudio_INCLUDE_DIRS
524              The PulseAudio include directory
525
526       PulseAudio_LIBRARIES
527              The PulseAudio libraries for linking
528
529       PulseAudio_MAINLOOP_LIBRARY
530              The libraries needed to use PulseAudio Mainloop
531
532       PulseAudio_VERSION
533              The version of PulseAudio that was found
534
535       PulseAudio_INCLUDE_DIR
536              Deprecated, use PulseAudio_INCLUDE_DIRS
537
538       PulseAudio_LIBRARY
539              Deprecated, use PulseAudio_LIBRARIES
540
541       If PulseAudio_FOUND is TRUE, it will also define the following imported
542       target:
543
544       PulseAudio::PulseAudio
545              The PulseAudio library
546
547       Since 5.41.0.
548
549   FindQtWaylandScanner
550       Try to find qtwaylandscanner.
551
552       If the qtwaylandscanner executable is not in your PATH, you can provide
553       an alternative name or full path location with the QtWaylandScanner_EX‐
554       ECUTABLE variable.
555
556       This will define the following variables:
557
558       QtWaylandScanner_FOUND
559              True if qtwaylandscanner is available
560
561       QtWaylandScanner_EXECUTABLE
562              The qtwaylandscanner executable.
563
564       If QtWaylandScanner_FOUND is TRUE, it will also  define  the  following
565       imported target:
566
567       Wayland::QtScanner
568              The qtwaylandscanner executable.
569
570       This  module  provides the following functions to generate C++ protocol
571       implementations:
572
573ecm_add_qtwayland_client_protocol
574
575ecm_add_qtwayland_server_protocol
576
577          ecm_add_qtwayland_client_protocol(<target>
578                                            PROTOCOL <xmlfile>
579                                            BASENAME <basename>
580                                            [PREFIX <prefix>])
581
582          ecm_add_qtwayland_client_protocol(<source_files_var>
583                                            PROTOCOL <xmlfile>
584                                            BASENAME <basename>
585                                            [PREFIX <prefix>])
586
587       Generate C++ wrapper to Wayland client protocol  files  from  <xmlfile>
588       XML  definition  for the <basename> interface and append those files to
589       <source_files_var> or <target>.  Pass the <prefix> argument if the  in‐
590       terface names don’t start with qt_ or wl_.
591
592       WaylandScanner is required and will be searched for.
593
594          ecm_add_qtwayland_server_protocol(<target>
595                                            PROTOCOL <xmlfile>
596                                            BASENAME <basename>
597                                            [PREFIX <prefix>])
598
599          ecm_add_qtwayland_server_protocol(<source_files_var>
600                                            PROTOCOL <xmlfile>
601                                            BASENAME <basename>
602                                            [PREFIX <prefix>])
603
604       Generate  C++  wrapper  to Wayland server protocol files from <xmlfile>
605       XML definition for the <basename> interface and append those  files  to
606       <source_files_var>  or <target>.  Pass the <prefix> argument if the in‐
607       terface names don’t start with qt_ or wl_.
608
609       WaylandScanner is required and will be searched for.
610
611       Since 1.4.0.
612
613   FindSasl2
614       Try to find the SASL2 library.
615
616       This will define the following variables:
617
618       Sasl2_FOUND
619              System has SASL2.
620
621       Sasl2_VERSION
622              The version of SASL2.
623
624       Sasl2_INCLUDE_DIRS
625              This should be passed  to  target_include_directories()  if  the
626              target is not used for linking.
627
628       Sasl2_LIBRARIES
629              The  SASL2  library.   This  can  be  passed  to target_link_li‐
630              braries() instead of the Sasl2::Sasl2 target
631
632       If Sasl2_FOUND is TRUE, the following imported target  will  be  avail‐
633       able:
634
635       Sasl2::Sasl2
636              The SASL2 library
637
638       Since 5.41.0.
639
640   FindSeccomp
641       Try to locate the libseccomp library.
642
643       This will define the following variables:
644
645       Seccomp_FOUND
646              True if the seccomp library is available
647
648       Seccomp_INCLUDE_DIRS
649              The seccomp include directories
650
651       Seccomp_LIBRARIES
652              The seccomp libraries for linking
653
654       If  Seccomp_FOUND  is  TRUE, it will also define the following imported
655       target:
656
657       Seccomp::Seccomp
658              The Seccomp library
659
660       Since 5.44.0.
661
662   FindSharedMimeInfo
663       Try to find the shared-mime-info package.
664
665       This will define the following variables:
666
667       SharedMimeInfo_FOUND
668              True if system has the shared-mime-info package
669
670       UPDATE_MIME_DATABASE_EXECUTABLE
671              The update-mime-database executable
672
673       and the following imported targets:
674
675       SharedMimeInfo::UpdateMimeDatabase
676              The update-mime-database executable
677
678       The follow macro is available:
679
680          update_xdg_mimetypes(<path>)
681
682       Updates the XDG mime database at install time (unless the $DESTDIR  en‐
683       vironment  variable  is set, in which case it is up to package managers
684       to perform this task).
685
686       Since pre-1.0.0.
687
688   FindTaglib
689       Try to find the Taglib library.
690
691       This will define the following variables:
692
693       Taglib_FOUND
694              True if the system has the taglib library of at least the  mini‐
695              mum version specified by the version parameter to find_package()
696
697       Taglib_INCLUDE_DIRS
698              The taglib include dirs for use with target_include_directories
699
700       Taglib_LIBRARIES
701              The taglib libraries for use with target_link_libraries()
702
703       Taglib_VERSION
704              The version of taglib that was found
705
706       If  Taglib_FOUND  is  TRUE,  it will also define the following imported
707       target:
708
709       Taglib::Taglib
710              The Taglib library
711
712       Since 5.72.0
713
714   FindUDev
715       Try to find the UDev library.
716
717       This will define the following variables:
718
719       UDev_FOUND
720              System has UDev.
721
722       UDev_INCLUDE_DIRS
723              The libudev include directory.
724
725       UDev_LIBRARIES
726              The libudev libraries.
727
728       UDev_VERSION
729              The libudev version.
730
731       If UDev_FOUND is TRUE, it will also define the following imported  tar‐
732       get:
733
734       UDev::UDev
735              The UDev library
736
737       Since 5.57.0.
738
739   FindWayland
740       Try to find Wayland.
741
742       This  is  a  component-based find module, which makes use of the COMPO‐
743       NENTS and OPTIONAL_COMPONENTS arguments to find_module.  The  following
744       components are available:
745
746          Client  Server  Cursor  Egl
747
748       If no components are specified, this module will act as though all com‐
749       ponents were passed to OPTIONAL_COMPONENTS.
750
751       This module will define the following variables, independently  of  the
752       components searched for or found:
753
754       Wayland_FOUND
755              TRUE if (the requested version of) Wayland is available
756
757       Wayland_VERSION
758              Found Wayland version
759
760       Wayland_TARGETS
761              A  list  of all targets imported by this module (note that there
762              may be more than the components that were requested)
763
764       Wayland_LIBRARIES
765              This can be passed to target_link_libraries() instead of the im‐
766              ported targets
767
768       Wayland_INCLUDE_DIRS
769              This  should  be  passed  to target_include_directories() if the
770              targets are not used for linking
771
772       Wayland_DEFINITIONS
773              This should be passed to target_compile_options() if the targets
774              are not used for linking
775
776       Wayland_DATADIR
777              The core wayland protocols data directory Since 5.73.0
778
779       For each searched-for components, Wayland_<component>_FOUND will be set
780       to TRUE if the corresponding Wayland library was found, and FALSE  oth‐
781       erwise.  If Wayland_<component>_FOUND is TRUE, the imported target Way‐
782       land::<component> will be defined.  This module will  also  attempt  to
783       determine  Wayland_*_VERSION  variables  for  each imported target, al‐
784       though Wayland_VERSION should normally be sufficient.
785
786       In general we recommend using the imported targets, as they are  easier
787       to  use  and  provide more control.  Bear in mind, however, that if any
788       target is in the link interface of an exported library, it must be made
789       available by the package config file.
790
791       Since pre-1.0.0.
792
793   FindWaylandProtocols
794       Try to find wayland-protocols on a Unix system.
795
796       This will define the following variables:
797
798       WaylandProtocols_FOUND
799              True  if  (the requested version of) wayland-protocols is avail‐
800              able
801
802       WaylandProtocols_VERSION
803              The version of wayland-protocols
804
805       WaylandProtocols_DATADIR
806              The wayland protocols data directory
807
808   FindWaylandScanner
809       Try to find wayland-scanner.
810
811       If the wayland-scanner executable is not in your PATH, you can  provide
812       an  alternative name or full path location with the WaylandScanner_EXE‐
813       CUTABLE variable.
814
815       This will define the following variables:
816
817       WaylandScanner_FOUND
818              True if wayland-scanner is available.
819
820       WaylandScanner_EXECUTABLE
821              The wayland-scanner executable.
822
823       If WaylandScanner_FOUND is TRUE, it will also define the following  im‐
824       ported target:
825
826       Wayland::Scanner
827              The wayland-scanner executable.
828
829       This module provides the following functions to generate C protocol im‐
830       plementations:
831
832ecm_add_wayland_client_protocol
833
834ecm_add_wayland_server_protocol
835
836          ecm_add_wayland_client_protocol(<target>
837                                          PROTOCOL <xmlfile>
838                                          BASENAME <basename>)
839
840          ecm_add_wayland_client_protocol(<source_files_var>
841                                          PROTOCOL <xmlfile>
842                                          BASENAME <basename>)
843
844       Generate Wayland client protocol files from  <xmlfile>  XML  definition
845       for    the   <basename>   interface   and   append   those   files   to
846       <source_files_var> or <target>.
847
848          ecm_add_wayland_server_protocol(<target>
849                                          PROTOCOL <xmlfile>
850                                          BASENAME <basename>)
851
852          ecm_add_wayland_server_protocol(<source_files_var>
853                                          PROTOCOL <xmlfile>
854                                          BASENAME <basename>)
855
856       Generate Wayland server protocol files from  <xmlfile>  XML  definition
857       for    the   <basename>   interface   and   append   those   files   to
858       <source_files_var> or <target>.
859
860       Since 1.4.0.
861
862   FindX11_XCB
863       Try to find the X11 XCB compatibility library.
864
865       This will define the following variables:
866
867       X11_XCB_FOUND
868              True if (the requested version of) libX11-xcb is available
869
870       X11_XCB_VERSION
871              The version of libX11-xcb (this is not guaranteed to be set even
872              when X11_XCB_FOUND is true)
873
874       X11_XCB_LIBRARIES
875              This  can  be  passed  to target_link_libraries() instead of the
876              EGL::EGL target
877
878       X11_XCB_INCLUDE_DIR
879              This should be passed  to  target_include_directories()  if  the
880              target is not used for linking
881
882       X11_XCB_DEFINITIONS
883              This  should be passed to target_compile_options() if the target
884              is not used for linking
885
886       If X11_XCB_FOUND is TRUE, it will also define  the  following  imported
887       target:
888
889       X11::XCB
890              The X11 XCB compatibility library
891
892       In  general  we recommend using the imported target, as it is easier to
893       use.  Bear in mind, however, that if the target is in the  link  inter‐
894       face  of  an exported library, it must be made available by the package
895       config file.
896
897       Since pre-1.0.0.
898
899   FindXCB
900       Try to find XCB.
901
902       This is a component-based find module, which makes use  of  the  COMPO‐
903       NENTS  and OPTIONAL_COMPONENTS arguments to find_module.  The following
904       components are available:
905
906          XCB
907          ATOM         AUX          COMPOSITE    CURSOR       DAMAGE
908          DPMS         DRI2         DRI3         EVENT        EWMH
909          GLX          ICCCM        IMAGE        KEYSYMS      PRESENT
910          RANDR        RECORD       RENDER       RENDERUTIL   RES
911          SCREENSAVER  SHAPE        SHM          SYNC         UTIL
912          XF86DRI      XFIXES       XINERAMA     XINPUT       XKB
913          XTEST        XV           XVMC
914
915       If no components are specified, this module will act as though all com‐
916       ponents  were  passed to OPTIONAL_COMPONENTS. Before 5.82 this excluded
917       XINPUT. Since 5.82 all components are searched for.
918
919       This module will define the following variables, independently  of  the
920       components searched for or found:
921
922       XCB_FOUND
923              True if (the requestion version of) xcb is available
924
925       XCB_VERSION
926              Found xcb version
927
928       XCB_TARGETS
929              A  list  of all targets imported by this module (note that there
930              may be more than the components that were requested)
931
932       XCB_LIBRARIES
933              This can be passed to target_link_libraries() instead of the im‐
934              ported targets
935
936       XCB_INCLUDE_DIRS
937              This  should  be  passed  to target_include_directories() if the
938              targets are not used for linking
939
940       XCB_DEFINITIONS
941              This should be passed to target_compile_options() if the targets
942              are not used for linking
943
944       For  each searched-for components, XCB_<component>_FOUND will be set to
945       true if the corresponding xcb library was found, and  false  otherwise.
946       If  XCB_<component>_FOUND is true, the imported target XCB::<component>
947       will be defined.  This module will also attempt to determine XCB_*_VER‐
948       SION  variables  for  each imported target, although XCB_VERSION should
949       normally be sufficient.
950
951       In general we recommend using the imported targets, as they are  easier
952       to  use  and  provide more control.  Bear in mind, however, that if any
953       target is in the link interface of an exported library, it must be made
954       available by the package config file.
955
956       Since pre-1.0.0.
957
958   Findepoxy
959       Try to find libepoxy on a Unix system.
960
961       This will define the following variables:
962
963       epoxy_FOUND
964              True if (the requested version of) libepoxy is available
965
966       epoxy_VERSION
967              The version of libepoxy
968
969       epoxy_LIBRARIES
970              This  should  be passed to target_link_libraries() if the target
971              is not used for linking
972
973       epoxy_INCLUDE_DIRS
974              This should be passed  to  target_include_directories()  if  the
975              target is not used for linking
976
977       epoxy_DEFINITIONS
978              This  should be passed to target_compile_options() if the target
979              is not used for linking
980
981       epoxy_HAS_GLX
982              True if GLX support is available
983
984       If epoxy_FOUND is TRUE, it will also define the following imported tar‐
985       get:
986
987       epoxy::epoxy
988              The epoxy library
989
990       In  general  we recommend using the imported target, as it is easier to
991       use.  Bear in mind, however, that if the target is in the  link  inter‐
992       face  of  an exported library, it must be made available by the package
993       config file.
994
995   Findgzip
996       Try to find gzip.
997
998       If the gzip executable is not in your PATH, you can provide an alterna‐
999       tive name or full path location with the gzip_EXECUTABLE variable.
1000
1001       This will define the following variables:
1002
1003       gzip_FOUND
1004              TRUE if gzip is available
1005
1006       gzip_EXECUTABLE
1007              Path to gzip executable
1008
1009       If  gzip_FOUND is TRUE, it will also define the following imported tar‐
1010       get:
1011
1012       gzip::gzip
1013              Path to gzip executable
1014
1015       Since 5.85.0.
1016

SEE ALSO

1018       ecm(7), ecm-modules(7), ecm-kde-modules(7)
1019
1021       KDE Developers
1022
1023
1024
1025
10265.111                            Oct 14, 2023              ECM-FIND-MODULES(7)
Impressum