diff --git a/find-modules/FindFontconfig.cmake b/find-modules/FindFontconfig.cmake index 6ac23a0..2981a9a 100644 --- a/find-modules/FindFontconfig.cmake +++ b/find-modules/FindFontconfig.cmake @@ -1,118 +1,118 @@ #.rst: # FindFontconfig # -------------- # # Try to find Fontconfig. # Once done this will define the following variables: # # ``Fontconfig_FOUND`` # True if Fontconfig is available # ``Fontconfig_INCLUDE_DIRS`` # The include directory to use for the Fontconfig headers # ``Fontconfig_LIBRARIES`` # The Fontconfig libraries for linking # ``Fontconfig_DEFINITIONS`` # Compiler switches required for using Fontconfig # ``Fontconfig_VERSION`` # The version of Fontconfig that has been found # -# If ``Fontconfig_FOUND`` is True, it will also define the following +# If ``Fontconfig_FOUND`` is TRUE, it will also define the following # imported target: # # ``Fontconfig::Fontconfig`` # # Since 5.57.0. #============================================================================= # Copyright (c) 2006,2007 Laurent Montel, # Copyright (c) 2018 Volker Krause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls find_package(PkgConfig QUIET) pkg_check_modules(PC_FONTCONFIG QUIET fontconfig) set(Fontconfig_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) find_path(Fontconfig_INCLUDE_DIRS fontconfig/fontconfig.h PATHS ${PC_FONTCONFIG_INCLUDE_DIRS} /usr/X11/include ) find_library(Fontconfig_LIBRARIES NAMES fontconfig PATHS ${PC_FONTCONFIG_LIBRARY_DIRS} ) set(Fontconfig_VERSION ${PC_FONTCONFIG_VERSION}) if (NOT Fontconfig_VERSION) find_file(Fontconfig_VERSION_HEADER NAMES "fontconfig/fontconfig.h" HINTS ${Fontconfig_INCLUDE_DIRS} ) mark_as_advanced(Fontconfig_VERSION_HEADER) if (Fontconfig_VERSION_HEADER) file(READ ${Fontconfig_VERSION_HEADER} _fontconfig_version_header_content) string(REGEX MATCH "#define FC_MAJOR[ \t]+[0-9]+" Fontconfig_MAJOR_VERSION_MATCH ${_fontconfig_version_header_content}) string(REGEX MATCH "#define FC_MINOR[ \t]+[0-9]+" Fontconfig_MINOR_VERSION_MATCH ${_fontconfig_version_header_content}) string(REGEX MATCH "#define FC_REVISION[ \t]+[0-9]+" Fontconfig_PATCH_VERSION_MATCH ${_fontconfig_version_header_content}) string(REGEX REPLACE ".*FC_MAJOR[ \t]+(.*)" "\\1" Fontconfig_MAJOR_VERSION ${Fontconfig_MAJOR_VERSION_MATCH}) string(REGEX REPLACE ".*FC_MINOR[ \t]+(.*)" "\\1" Fontconfig_MINOR_VERSION ${Fontconfig_MINOR_VERSION_MATCH}) string(REGEX REPLACE ".*FC_REVISION[ \t]+(.*)" "\\1" Fontconfig_PATCH_VERSION ${Fontconfig_PATCH_VERSION_MATCH}) set(Fontconfig_VERSION "${Fontconfig_MAJOR_VERSION}.${Fontconfig_MINOR_VERSION}.${Fontconfig_PATCH_VERSION}") endif() endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Fontconfig FOUND_VAR Fontconfig_FOUND REQUIRED_VARS Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS VERSION_VAR Fontconfig_VERSION ) mark_as_advanced(Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS) if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig) add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED) set_target_properties(Fontconfig::Fontconfig PROPERTIES IMPORTED_LOCATION "${Fontconfig_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIRS}" INTERFACE_COMPILER_DEFINITIONS "${Fontconfig_DEFINITIONS}" ) endif() # backward compatibility, remove in kf6 set(FONTCONFIG_INCLUDE_DIR "${Fontconfig_INCLUDE_DIRS}") set(FONTCONFIG_LIBRARIES "${Fontconfig_LIBRARIES}") set(FONTCONFIG_DEFINITIONS "${Fontconfig_DEFINITIONS}") mark_as_advanced(FONTCONFIG_INCLUDE_DIR FONTCONFIG_LIBRARIES FONTCONFIG_DEFINITIONS) include(FeatureSummary) set_package_properties(Fontconfig PROPERTIES URL "https://www.fontconfig.org/" DESCRIPTION "Fontconfig is a library for configuring and customizing font access" ) diff --git a/find-modules/FindInotify.cmake b/find-modules/FindInotify.cmake index 15667e0..cc4aa29 100644 --- a/find-modules/FindInotify.cmake +++ b/find-modules/FindInotify.cmake @@ -1,81 +1,81 @@ #.rst: # FindInotify # -------------- # # Try to find inotify on this system. This finds: -# - libinotiy on Unix like systems, or +# - libinotify on Unix like systems, or # - the kernel's inotify on Linux systems. # # This will define the following variables: # # ``Inotify_FOUND`` # True if inotify is available # ``Inotify_LIBRARIES`` # This has to be passed to target_link_libraries() # ``Inotify_INCLUDE_DIRS`` # This has to be passed to target_include_directories() # # On Linux, the libraries and include directories are empty, -# even though Inotify_FOUND may be set to TRUE. This is because +# even though ``Inotify_FOUND`` may be set to TRUE. This is because # no special includes or libraries are needed. On other systems # these may be needed to use inotify. # # Since 5.32.0. #============================================================================= # Copyright 2016 Tobias C. Berner # Copyright 2017 Adriaan de Groot # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= find_path(Inotify_INCLUDE_DIRS sys/inotify.h) if(Inotify_INCLUDE_DIRS) # On Linux there is no library to link against, on the BSDs there is. # On the BSD's, inotify is implemented through a library, libinotify. if( CMAKE_SYSTEM_NAME MATCHES "Linux") set(Inotify_FOUND TRUE) set(Inotify_LIBRARIES "") set(Inotify_INCLUDE_DIRS "") else() find_library(Inotify_LIBRARIES NAMES inotify) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Inotify FOUND_VAR Inotify_FOUND REQUIRED_VARS Inotify_LIBRARIES Inotify_INCLUDE_DIRS ) mark_as_advanced(Inotify_LIBRARIES Inotify_INCLUDE_DIRS) include(FeatureSummary) set_package_properties(Inotify PROPERTIES URL "https://github.com/libinotify-kqueue/" DESCRIPTION "inotify API on the *BSD family of operating systems." ) endif() else() set(Inotify_FOUND FALSE) endif() mark_as_advanced(Inotify_LIBRARIES Inotify_INCLUDE_DIRS) diff --git a/find-modules/FindLibExiv2.cmake b/find-modules/FindLibExiv2.cmake index 935cee2..d4dfc62 100644 --- a/find-modules/FindLibExiv2.cmake +++ b/find-modules/FindLibExiv2.cmake @@ -1,115 +1,118 @@ #.rst: # FindLibExiv2 # ------------ # # Try to find the Exiv2 library. # # This will define the following variables: # # ``LibExiv2_FOUND`` -# System has LibExiv2. +# True if (the requested version of) Exiv2 is available # # ``LibExiv2_VERSION`` -# The version of LibExiv2. +# The version of Exiv2 # # ``LibExiv2_INCLUDE_DIRS`` -# This should be passed to target_include_directories() if -# the target is not used for linking. +# The include dirs of Exiv2 for use with target_include_directories() # # ``LibExiv2_LIBRARIES`` -# The LibExiv2 library. +# The Exiv2 library for use with target_link_libraries(). # This can be passed to target_link_libraries() instead of # the ``LibExiv2::LibExiv2`` target # -# If ``LibExiv2_FOUND`` is TRUE, the following imported target -# will be available: +# If ``LibExiv2_FOUND`` is TRUE, it will also define the following imported +# target: # # ``LibExiv2::LibExiv2`` # The Exiv2 library # +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. +# # Since 5.53.0. # #============================================================================= # Copyright (c) 2018, Christophe Giboudeaux, # Copyright (c) 2010, Alexander Neundorf, # Copyright (c) 2008, Gilles Caulier, # # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= find_package(PkgConfig QUIET) pkg_check_modules(PC_EXIV2 QUIET exiv2) find_path(LibExiv2_INCLUDE_DIRS NAMES exiv2/exif.hpp HINTS ${PC_EXIV2_INCLUDEDIR} ) find_library(LibExiv2_LIBRARIES NAMES exiv2 libexiv2 HINTS ${PC_EXIV2_LIBRARY_DIRS} ) set(LibExiv2_VERSION ${PC_EXIV2_VERSION}) if(NOT LibExiv2_VERSION AND DEFINED LibExiv2_INCLUDE_DIRS) # With exiv >= 0.27, the version #defines are in exv_conf.h instead of version.hpp foreach(_exiv2_version_file "version.hpp" "exv_conf.h") if(EXISTS "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}") file(READ "${LibExiv2_INCLUDE_DIRS}/exiv2/${_exiv2_version_file}" _exiv_version_file_content) string(REGEX MATCH "#define EXIV2_MAJOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MAJOR_VERSION_MATCH ${_exiv_version_file_content}) string(REGEX MATCH "#define EXIV2_MINOR_VERSION[ ]+\\([0-9]+\\)" EXIV2_MINOR_VERSION_MATCH ${_exiv_version_file_content}) string(REGEX MATCH "#define EXIV2_PATCH_VERSION[ ]+\\([0-9]+\\)" EXIV2_PATCH_VERSION_MATCH ${_exiv_version_file_content}) if(EXIV2_MAJOR_VERSION_MATCH) string(REGEX REPLACE ".*_MAJOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MAJOR_VERSION ${EXIV2_MAJOR_VERSION_MATCH}) string(REGEX REPLACE ".*_MINOR_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_MINOR_VERSION ${EXIV2_MINOR_VERSION_MATCH}) string(REGEX REPLACE ".*_PATCH_VERSION[ ]+\\((.*)\\)" "\\1" EXIV2_PATCH_VERSION ${EXIV2_PATCH_VERSION_MATCH}) endif() endif() endforeach() set(LibExiv2_VERSION "${EXIV2_MAJOR_VERSION}.${EXIV2_MINOR_VERSION}.${EXIV2_PATCH_VERSION}") endif() include(FindPackageHandleStandardArgs) find_package_handle_standard_args(LibExiv2 FOUND_VAR LibExiv2_FOUND REQUIRED_VARS LibExiv2_LIBRARIES LibExiv2_INCLUDE_DIRS VERSION_VAR LibExiv2_VERSION ) mark_as_advanced(LibExiv2_INCLUDE_DIRS LibExiv2_LIBRARIES) if(LibExiv2_FOUND AND NOT TARGET LibExiv2::LibExiv2) add_library(LibExiv2::LibExiv2 UNKNOWN IMPORTED) set_target_properties(LibExiv2::LibExiv2 PROPERTIES IMPORTED_LOCATION "${LibExiv2_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${LibExiv2_INCLUDE_DIRS}" ) endif() include(FeatureSummary) set_package_properties(LibExiv2 PROPERTIES URL "http://www.exiv2.org" DESCRIPTION "Image metadata support" ) diff --git a/find-modules/FindPhoneNumber.cmake b/find-modules/FindPhoneNumber.cmake index 4813c1a..0c62800 100644 --- a/find-modules/FindPhoneNumber.cmake +++ b/find-modules/FindPhoneNumber.cmake @@ -1,95 +1,94 @@ #.rst: # FindPhoneNumber # --------------- # -# This module finds if PhoneNumber is installed. +# Try to find PhoneNumber. # # This is a component-based find module, which makes use of the COMPONENTS and # OPTIONAL_COMPONENTS arguments to find_module. The following components are -# available: +# available:: # -# PhoneNumber -# GeoCoding +# PhoneNumber GeoCoding # # If no components are specified, this module will act as though all components # were passed to OPTIONAL_COMPONENTS. # # This module will define the following variables, independently of the # components searched for or found: # # ``PhoneNumber_FOUND`` # True if (the requestion version of) PhoneNumber is available # # For each searched-for components, ``PhoneNumber__FOUND`` will be set to # TRUE if the corresponding library was found, and FALSE otherwise. If # ``PhoneNumber__FOUND`` is TRUE, the imported target ``PhoneNumber::`` # will be defined. # # Since 5.54.0. #============================================================================= # Copyright (c) 2017 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.com # Copyright (c) 2018 Volker Krause # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= include(ECMFindModuleHelpersStub) ecm_find_package_version_check(PhoneNumber) set(PhoneNumber_known_components PhoneNumber GeoCoding ) set(PhoneNumber_default_components ${PhoneNumber_known_components}) set(PhoneNumber_PhoneNumber_lib phonenumber) set(PhoneNumber_PhoneNumber_header phonenumbers/phonenumberutil.h) set(PhoneNumber_GeoCoding_lib geocoding) set(PhoneNumber_GeoCoding_header phonenumbers/geocoding/phonenumber_offline_geocoder.h) ecm_find_package_parse_components(PhoneNumber RESULT_VAR PhoneNumber_components KNOWN_COMPONENTS ${PhoneNumber_known_components} DEFAULT_COMPONENTS ${PhoneNumber_default_components} ) ecm_find_package_handle_library_components(PhoneNumber COMPONENTS ${PhoneNumber_components} ) find_package_handle_standard_args(PhoneNumber FOUND_VAR PhoneNumber_FOUND REQUIRED_VARS PhoneNumber_LIBRARIES VERSION_VAR PhoneNumber_VERSION HANDLE_COMPONENTS ) set(PhoneNumber_VERSION 0) # there is no observable version number in the installed files include(FeatureSummary) set_package_properties(PhoneNumber PROPERTIES URL "https://github.com/googlei18n/libphonenumber" DESCRIPTION "Library for parsing, formatting, and validating international phone numbers") diff --git a/find-modules/FindPoppler.cmake b/find-modules/FindPoppler.cmake index 4cbe1d2..db99c69 100644 --- a/find-modules/FindPoppler.cmake +++ b/find-modules/FindPoppler.cmake @@ -1,151 +1,151 @@ #.rst: # FindPoppler # ----------- # # Try to find Poppler. # # This is a component-based find module, which makes use of the COMPONENTS # and OPTIONAL_COMPONENTS arguments to find_module. The following components # are available:: # -# Core Cpp Qt5 Qt4 Glib +# Core Cpp Qt5 Qt4 Glib # # If no components are specified, this module will act as though all components # were passed to OPTIONAL_COMPONENTS. # # This module will define the following variables, independently of the # components searched for or found: # # ``Poppler_FOUND`` # TRUE if (the requested version of) Poppler is available # ``Poppler_VERSION`` # Found Poppler version # ``Poppler_TARGETS`` # A list of all targets imported by this module (note that there may be more # than the components that were requested) # ``Poppler_LIBRARIES`` # This can be passed to target_link_libraries() instead of the imported # targets # ``Poppler_INCLUDE_DIRS`` # This should be passed to target_include_directories() if the targets are # not used for linking # ``Poppler_DEFINITIONS`` # This should be passed to target_compile_options() if the targets are not # used for linking # # For each searched-for components, ``Poppler__FOUND`` will be set to # TRUE if the corresponding Poppler library was found, and FALSE otherwise. If # ``Poppler__FOUND`` is TRUE, the imported target # ``Poppler::`` will be defined. This module will also attempt to # determine ``Poppler_*_VERSION`` variables for each imported target, although # ``Poppler_VERSION`` should normally be sufficient. # # In general we recommend using the imported targets, as they are easier to use # and provide more control. Bear in mind, however, that if any target is in the # link interface of an exported library, it must be made available by the # package config file. # # Since 5.19 #============================================================================= # Copyright 2015 Alex Richardson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) ecm_find_package_version_check(Poppler) set(Poppler_known_components Cpp Qt4 Qt5 Glib ) foreach(_comp ${Poppler_known_components}) string(TOLOWER "${_comp}" _lc_comp) set(Poppler_${_comp}_component_deps "Core") set(Poppler_${_comp}_pkg_config "poppler-${_lc_comp}") set(Poppler_${_comp}_lib "poppler-${_lc_comp}") set(Poppler_${_comp}_header_subdir "poppler/${_lc_comp}") endforeach() set(Poppler_known_components Core ${Poppler_known_components}) set(Poppler_Core_component_deps "") set(Poppler_Core_pkg_config "poppler") # poppler-config.h header is only installed with --enable-xpdf-headers # fall back to using any header from a submodule with a path to make it work in that case too set(Poppler_Core_header "poppler-config.h" "cpp/poppler-version.h" "qt5/poppler-qt5.h" "qt4/poppler-qt4.h" "glib/poppler.h") set(Poppler_Core_header_subdir "poppler") set(Poppler_Core_lib "poppler") set(Poppler_Cpp_header "poppler-version.h") set(Poppler_Qt5_header "poppler-qt5.h") set(Poppler_Qt4_header "poppler-qt4.h") set(Poppler_Glib_header "poppler.h") ecm_find_package_parse_components(Poppler RESULT_VAR Poppler_components KNOWN_COMPONENTS ${Poppler_known_components} ) ecm_find_package_handle_library_components(Poppler COMPONENTS ${Poppler_components} ) # If pkg-config didn't provide us with version information, # try to extract it from poppler-version.h or poppler-config.h if(NOT Poppler_VERSION) find_file(Poppler_VERSION_HEADER NAMES "poppler-config.h" "cpp/poppler-version.h" HINTS ${Poppler_INCLUDE_DIRS} PATH_SUFFIXES ${Poppler_Core_header_subdir} ) mark_as_advanced(Poppler_VERSION_HEADER) if(Poppler_VERSION_HEADER) file(READ ${Poppler_VERSION_HEADER} _poppler_version_header_contents) string(REGEX REPLACE "^.*[ \t]+POPPLER_VERSION[ \t]+\"([0-9d.]*)\".*$" "\\1" Poppler_VERSION "${_poppler_version_header_contents}" ) unset(_poppler_version_header_contents) endif() endif() find_package_handle_standard_args(Poppler FOUND_VAR Poppler_FOUND REQUIRED_VARS Poppler_LIBRARIES VERSION_VAR Poppler_VERSION HANDLE_COMPONENTS ) include(FeatureSummary) set_package_properties(Poppler PROPERTIES DESCRIPTION "A PDF rendering library" URL "https://poppler.freedesktop.org/" ) diff --git a/find-modules/FindSeccomp.cmake b/find-modules/FindSeccomp.cmake index eeb83c4..76c83e8 100644 --- a/find-modules/FindSeccomp.cmake +++ b/find-modules/FindSeccomp.cmake @@ -1,90 +1,91 @@ #.rst: # FindSeccomp # ----------- # # Try to locate the libseccomp library. -# If found, this will define the following variables: +# +# This will define the following variables: # # ``Seccomp_FOUND`` # True if the seccomp library is available # ``Seccomp_INCLUDE_DIRS`` # The seccomp include directories # ``Seccomp_LIBRARIES`` # The seccomp libraries for linking # # If ``Seccomp_FOUND`` is TRUE, it will also define the following # imported target: # # ``Seccomp::Seccomp`` # The Seccomp library # # Since 5.44.0. #============================================================================= # Copyright (c) 2017 Martin Flöser # Copyright (c) 2017 David Kahles # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= find_package(PkgConfig QUIET) pkg_check_modules(PKG_Libseccomp QUIET libseccomp) find_path(Seccomp_INCLUDE_DIRS NAMES seccomp.h HINTS ${PKG_Libseccomp_INCLUDE_DIRS} ) find_library(Seccomp_LIBRARIES NAMES seccomp HINTS ${PKG_Libseccomp_LIBRARY_DIRS} ) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Seccomp FOUND_VAR Seccomp_FOUND REQUIRED_VARS Seccomp_LIBRARIES Seccomp_INCLUDE_DIRS ) if (Seccomp_FOUND AND NOT TARGET Seccomp::Seccomp) add_library(Seccomp::Seccomp UNKNOWN IMPORTED) set_target_properties(Seccomp::Seccomp PROPERTIES IMPORTED_LOCATION "${Seccomp_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${Seccomp_INCLUDE_DIRS}" ) endif() mark_as_advanced(Seccomp_LIBRARIES Seccomp_INCLUDE_DIRS) include(FeatureSummary) set_package_properties(Seccomp PROPERTIES URL "https://github.com/seccomp/libseccomp" DESCRIPTION "The enhanced seccomp library." ) diff --git a/find-modules/FindUDev.cmake b/find-modules/FindUDev.cmake index b755741..20d3f11 100644 --- a/find-modules/FindUDev.cmake +++ b/find-modules/FindUDev.cmake @@ -1,92 +1,94 @@ #.rst: # FindUDev # -------- # -# Try to find the UDev library, once done this will define: +# Try to find the UDev library. # -# ``UDev_FOUND`` -# System has UDev. +# This will define the following variables: # -# ``UDev_INCLUDE_DIRS`` -# The libudev include directory. +# ``UDev_FOUND`` +# System has UDev. +# +# ``UDev_INCLUDE_DIRS`` +# The libudev include directory. # # ``UDev_LIBRARIES`` # The libudev libraries. # # ``UDev_VERSION`` # The libudev version. # -# If ``UDev_FOUND`` is TRUE, the following imported target -# will be available: +# If ``UDev_FOUND`` is TRUE, it will also define the following imported +# target: # # ``UDev::UDev`` # The UDev library # # Since 5.57.0. #============================================================================= # Copyright (c) 2010, Rafael Fernández López, # Copyright (c) 2019, Volker Krause, # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. #============================================================================= find_package(PkgConfig QUIET) pkg_check_modules(PC_UDEV QUIET libudev) find_path(UDev_INCLUDE_DIRS NAMES libudev.h HINTS ${PC_UDEV_INCLUDE_DIRS}) find_library(UDev_LIBRARIES NAMES udev HINTS ${PC_UDEV_LIBRARY_DIRS}) set(UDev_VERSION ${PC_UDEV_VERSION}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(UDev FOUND_VAR UDev_FOUND REQUIRED_VARS UDev_INCLUDE_DIRS UDev_LIBRARIES VERSION_VAR UDev_VERSION ) mark_as_advanced(UDev_INCLUDE_DIRS UDev_LIBRARIES) if(UDev_FOUND AND NOT TARGET UDev::UDev) add_library(UDev::UDev UNKNOWN IMPORTED) set_target_properties(UDev::UDev PROPERTIES IMPORTED_LOCATION "${UDev_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${UDev_INCLUDE_DIRS}" INTERFACE_COMPILE_DEFINITIONS "${PC_UDEV_CFLAGS_OTHER}" ) endif() # backward compat variables, remove for KF6 set(UDEV_FOUND ${UDev_FOUND}) set(UDEV_LIBS ${UDev_LIBRARIES}) set(UDEV_INCLUDE_DIR ${UDev_INCLUDE_DIRS}) mark_as_advanced(UDEV_FOUND UDEV_LIBS UDEV_INCLUDE_DIR) include(FeatureSummary) set_package_properties(UDev PROPERTIES DESCRIPTION "API for enumerating and introspecting local devices (part of systemd)" URL "https://freedesktop.org/wiki/Software/systemd/" )