Warning, /frameworks/extra-cmake-modules/docs/manual/ecm-find-modules.7.rst is written in an unsupported language. File is not indexed.

0001 .. ecm-manual-description: ECM Find Modules Reference
0002 
0003 ecm-find-modules(7)
0004 *******************
0005 
0006 .. only:: html or latex
0007 
0008    .. contents::
0009 
0010 Introduction
0011 ============
0012 
0013 Find modules are used by the CMake ``find_package`` command to search for
0014 packages that do not provide their own CMake package config files. CMake
0015 provides an extensive set of find modules, and Extra CMake Modules (ECM) adds
0016 to that.
0017 
0018 To use ECM's find modules, you need to tell CMake to find the ECM package, and
0019 then add either ``${ECM_MODULE_PATH}`` or ``${ECM_FIND_MODULE_DIR}`` to the
0020 ``CMAKE_MODULE_PATH`` variable:
0021 
0022 .. code-block:: cmake
0023 
0024   find_package(ECM REQUIRED NO_MODULE)
0025   set(CMAKE_MODULE_PATH ${ECM_FIND_MODULE_DIR})
0026 
0027 Using ``${ECM_MODULE_PATH}`` will also make the modules intended for direct use
0028 by CMake scripts available (see :manual:`ecm-modules(7)` and
0029 :manual:`ecm-kde-modules(7)`).
0030 
0031 You can also make local copies of find modules using the
0032 ``ecm_use_find_modules`` function from :module:`ECMUseFindModules`, which is
0033 automatically included when ECM is found:
0034 
0035 .. code-block:: cmake
0036 
0037   find_package(ECM REQUIRED NO_MODULE)
0038   ecm_use_find_modules(
0039       DIR "${CMAKE_BINARY_DIR}/cmake"
0040       MODULES FindEGL.cmake
0041   )
0042   set(CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/cmake")
0043 
0044 This allows selective use of ECM's find modules, and the NO_OVERRIDE argument
0045 can be used to ensure that if CMake ships its own version of that find module,
0046 it will be used instead.
0047 
0048 
0049 All Find Modules
0050 ================
0051 
0052 .. toctree::
0053    :maxdepth: 1
0054    :glob:
0055 
0056    /find-module/*
0057 
0058 .. only:: man
0059 
0060   See Also
0061   ========
0062 
0063   :manual:`ecm(7)`, :manual:`ecm-modules(7)`, :manual:`ecm-kde-modules(7)`
0064