diff --git a/cmake/modules/FindACL.cmake b/cmake/modules/FindACL.cmake index 7d3fa14f..5b74fd62 100644 --- a/cmake/modules/FindACL.cmake +++ b/cmake/modules/FindACL.cmake @@ -1,5 +1,4 @@ -# - Try to find the ACL library -# Once done this will define +# Try to find the ACL library, once done this will define: # # ACL_FOUND - system has the ACL library # ACL_LIBS - The libraries needed to use ACL @@ -16,21 +15,21 @@ check_include_files(sys/xattr.h HAVE_SYS_XATTR_H) check_include_files(sys/acl.h HAVE_SYS_ACL_H) check_include_files(acl/libacl.h HAVE_ACL_LIBACL_H) -if (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) - set(ACL_HEADERS_FOUND TRUE) -endif (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) +if(HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) + set(ACL_HEADERS_FOUND TRUE) +endif() if (ACL_HEADERS_FOUND) find_library(ACL_LIBS NAMES acl ) find_library(ATTR_LIBS NAMES attr ) -endif (ACL_HEADERS_FOUND) +endif() -if (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) - set(ACL_FOUND TRUE) - set(ACL_LIBS ${ACL_LIBS} ${ATTR_LIBS}) - message(STATUS "Found ACL support: ${ACL_LIBS}") -endif (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) +if(ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) + set(ACL_FOUND TRUE) + set(ACL_LIBS ${ACL_LIBS} ${ATTR_LIBS}) + message(STATUS "Found ACL support: ${ACL_LIBS}") +endif() mark_as_advanced(ACL_LIBS ATTR_LIBS) diff --git a/cmake/modules/FindAlsa.cmake b/cmake/modules/FindAlsa.cmake index f21bc60c..e6c73d0a 100644 --- a/cmake/modules/FindAlsa.cmake +++ b/cmake/modules/FindAlsa.cmake @@ -1,12 +1,10 @@ -# - Try to find ALSA -# -# Once done this will define +# Try to find the ALSA, once done this will define: # # ALSA_FOUND - system has ALSA # ALSA_INCLUDES - the ALSA include directory # ALSA_LIBRARIES - the libraries needed to use ALSA # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindAvahi.cmake b/cmake/modules/FindAvahi.cmake index ef03d093..b205539a 100644 --- a/cmake/modules/FindAvahi.cmake +++ b/cmake/modules/FindAvahi.cmake @@ -1,11 +1,9 @@ -# - Try to find Avahi -# -# Once done this will define +# Try to find the Avahi, once done this will define: # # AVAHI_FOUND - system has Avahi # AVAHI_INCLUDE_DIR - the Avahi include directory # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindDBusMenuQt.cmake b/cmake/modules/FindDBusMenuQt.cmake index 0f3d95eb..37b16500 100644 --- a/cmake/modules/FindDBusMenuQt.cmake +++ b/cmake/modules/FindDBusMenuQt.cmake @@ -1,13 +1,11 @@ -# - Try to find DBusMenuQt library -# -# Once done this will define +# Try to find the DBusMenuQt library, once done this will define: # # DBUSMENUQT_FOUND - system has DBusMenuQt # DBUSMENUQT_INCLUDE_DIR - the DBusMenuQt include directory # DBUSMENUQT_LIBRARIES - the libraries needed to use DBusMenuQt # DBUSMENUQT_DEFINITIONS - compiler switches required for using DBusMenuQt # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindDNSSD.cmake b/cmake/modules/FindDNSSD.cmake index e2ee6b82..cae27e0c 100644 --- a/cmake/modules/FindDNSSD.cmake +++ b/cmake/modules/FindDNSSD.cmake @@ -1,5 +1,4 @@ -# - Try to find DNSSD -# Once done this will define +# Try to find DNSSD, once done this will define: # # DNSSD_FOUND - system has DNSSD # DNSSD_INCLUDE_DIR - the DNSSD include directory @@ -15,36 +14,33 @@ include(CMakePushCheckState) -FIND_PATH(DNSSD_INCLUDE_DIR dns_sd.h - /usr/include/avahi-compat-libdns_sd/ +find_path(DNSSD_INCLUDE_DIR + NAMES dns_sd.h + HINTS /usr/include/avahi-compat-libdns_sd/ ) -if (DNSSD_INCLUDE_DIR) - if (APPLE) - set(DNSSD_LIBRARIES "/usr/lib/libSystem.dylib") - else (APPLE) - FIND_LIBRARY(DNSSD_LIBRARIES NAMES dns_sd ) - endif (APPLE) +if(DNSSD_INCLUDE_DIR) + find_library(DNSSD_LIBRARIES NAMES dns_sd) - cmake_reset_check_state() - set(CMAKE_REQUIRED_INCLUDES ${DNSSD_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${DNSSD_LIBRARIES}) - CHECK_FUNCTION_EXISTS(DNSServiceRefDeallocate DNSSD_FUNCTION_FOUND) - cmake_reset_check_state() + cmake_reset_check_state() + set(CMAKE_REQUIRED_INCLUDES ${DNSSD_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${DNSSD_LIBRARIES}) + CHECK_FUNCTION_EXISTS(DNSServiceRefDeallocate DNSSD_FUNCTION_FOUND) + cmake_reset_check_state() - if (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) - set(DNSSD_FOUND TRUE) - endif (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) -endif (DNSSD_INCLUDE_DIR) + if(DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) + set(DNSSD_FOUND TRUE) + endif() +endif() -if (DNSSD_FOUND) - if (NOT DNSSD_FIND_QUIETLY) - message(STATUS "Found DNSSD: ${DNSSD_LIBRARIES}") - endif (NOT DNSSD_FIND_QUIETLY) -else (DNSSD_FOUND) - if (DNSSD_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find DNSSD") - endif (DNSSD_FIND_REQUIRED) -endif (DNSSD_FOUND) +if(DNSSD_FOUND) + if (NOT DNSSD_FIND_QUIETLY) + message(STATUS "Found DNSSD: ${DNSSD_LIBRARIES}") + endif() +else() + if(DNSSD_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find DNSSD") + endif() +endif() MARK_AS_ADVANCED(DNSSD_INCLUDE_DIR DNSSD_LIBRARIES) diff --git a/cmake/modules/FindDjVuLibre.cmake b/cmake/modules/FindDjVuLibre.cmake index 4403127e..ca6acd59 100644 --- a/cmake/modules/FindDjVuLibre.cmake +++ b/cmake/modules/FindDjVuLibre.cmake @@ -1,39 +1,37 @@ -# - Try to find the DjVuLibre library -# Once done this will define +# Try to find the DjVuLibre library, once done this will define: # # DJVULIBRE_FOUND - system has the DjVuLibre library # DJVULIBRE_INCLUDE_DIR - the DjVuLibre include directory # DJVULIBRE_LIBRARY - Link this to use the DjVuLibre library +# +# Copyright (c) 2021 Ivailo Monev +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) +if(NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PC_DJVULIBRE ddjvuapi) +endif() - # in cache already - set(DJVULIBRE_FOUND TRUE) +set(DJVULIBRE_VERSION ${PC_DJVULIBRE_VERSION}) -else (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) - IF (NOT WIN32) - find_package(PkgConfig) - - pkg_check_modules(PC_DJVULIBRE ddjvuapi) - endif(NOT WIN32) - - find_path(DJVULIBRE_INCLUDE_DIR libdjvu/ddjvuapi.h - PATHS - ${PC_DJVULIBRE_INCLUDEDIR} - ${PC_DJVULIBRE_INCLUDE_DIRS} - ${GNUWIN32_DIR}/include +if(NOT DJVULIBRE_INCLUDE_DIR OR NOT DJVULIBRE_LIBRARY) + find_path(DJVULIBRE_INCLUDE_DIR + NAMES libdjvu/ddjvuapi.h + HINTS $ENV{DJVULIBREDIR}/include ) - find_library(DJVULIBRE_LIBRARY NAMES djvulibre - PATHS - ${PC_DJVULIBRE_LIBDIR} - ${PC_DJVULIBRE_LIBRARY_DIRS} - ${GNUWIN32_DIR}/lib + find_library(DJVULIBRE_LIBRARY + NAMES djvulibre + HINTS $ENV{DJVULIBREDIR}/lib ) +endif() - include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(DjVuLibre DEFAULT_MSG DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY ) - - mark_as_advanced(DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(DjVuLibre + VERSION_VAR DJVULIBRE_VERSION + REQUIRED_VARS DJVULIBRE_LIBRARY DJVULIBRE_INCLUDE_DIR +) -endif (DJVULIBRE_INCLUDE_DIR AND DJVULIBRE_LIBRARY) +mark_as_advanced(DJVULIBRE_INCLUDE_DIR DJVULIBRE_LIBRARY) diff --git a/cmake/modules/FindENCHANT.cmake b/cmake/modules/FindENCHANT.cmake index eb31aa53..b290ed37 100644 --- a/cmake/modules/FindENCHANT.cmake +++ b/cmake/modules/FindENCHANT.cmake @@ -1,13 +1,11 @@ -# - Try to find the Enchant spell checker -# -# Once done this will define +# Try to find the Enchant spell checker, once done this will define: # # ENCHANT_FOUND - system has ENCHANT # ENCHANT_INCLUDE_DIR - the ENCHANT include directory # ENCHANT_LIBRARIES - the libraries needed to use ENCHANT # ENCHANT_DEFINITIONS - compiler switches required for using ENCHANT # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindEPub.cmake b/cmake/modules/FindEPub.cmake index 61ce27d8..3bd650ed 100644 --- a/cmake/modules/FindEPub.cmake +++ b/cmake/modules/FindEPub.cmake @@ -1,12 +1,10 @@ -# - Try to find EPub library -# -# Once done this will define +# Try to find EPub library, once done this will define: # # EPUB_FOUND - system has EPub library # EPUB_INCLUDE_DIR - the EPub library include directory # EPUB_LIBRARIES - the libraries needed to use EPub library # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindExiv2.cmake b/cmake/modules/FindExiv2.cmake index 57df6748..a8f5ca73 100644 --- a/cmake/modules/FindExiv2.cmake +++ b/cmake/modules/FindExiv2.cmake @@ -1,13 +1,11 @@ -# - Try to find Exiv2 library -# -# Once done this will define +# Try to find Exiv2 library, once done this will define: # # EXIV2_FOUND - system has Exiv2 # EXIV2_INCLUDE_DIR - the Exiv2 include directory # EXIV2_LIBRARIES - the libraries needed to use Exiv2 # EXIV2_DEFINITIONS - compiler switches required for using Exiv2 # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindFFmpegThumbnailer.cmake b/cmake/modules/FindFFmpegThumbnailer.cmake index 54c211de..16646f44 100644 --- a/cmake/modules/FindFFmpegThumbnailer.cmake +++ b/cmake/modules/FindFFmpegThumbnailer.cmake @@ -1,12 +1,10 @@ -# - Try to find FFmpegthumbnailer library -# -# Once done this will define +# Try to find FFmpegthumbnailer library, once done this will define: # # FFMPEGTHUMBNAILER_FOUND - system has FFmpegthumbnailer # FFMPEGTHUMBNAILER_INCLUDES - the FFmpegthumbnailer include directory # FFMPEGTHUMBNAILER_LIBRARIES - the libraries needed to use FFmpegthumbnailer # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindFLAC++.cmake b/cmake/modules/FindFLAC++.cmake index 77ad45a0..cc3bdac0 100644 --- a/cmake/modules/FindFLAC++.cmake +++ b/cmake/modules/FindFLAC++.cmake @@ -1,13 +1,11 @@ -# - Try to find the FLAC++ library -# -# Once done this will define +# Try to find the FLAC++ library, once done this will define: # # FLAC_FOUND - system has FLAC++ # FLAC_INCLUDES - the FLAC++ include directories # FLAC_LIBRARIES - the libraries needed to use FLAC++ # FLAC_DEFINITIONS - compiler switches required for using FLAC++ # -# Copyright (c) 2019-2020, Ivailo Monev, +# Copyright (c) 2019 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindFontconfig.cmake b/cmake/modules/FindFontconfig.cmake index 444fdf2e..981569e1 100644 --- a/cmake/modules/FindFontconfig.cmake +++ b/cmake/modules/FindFontconfig.cmake @@ -1,13 +1,11 @@ -# - Try to find Fontconfig -# -# Once done this will define +# Try to find Fontconfig, once done this will define: # # FONTCONFIG_FOUND - system has Fontconfig # FONTCONFIG_INCLUDE_DIR -the Fontconfig include directory # FONTCONFIG_LIBRARIES - the libraries needed to use Fontconfig # FONTCONFIG_DEFINITIONS - compiler switches required for using Fontconfig # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindGIO.cmake b/cmake/modules/FindGIO.cmake index b1e46867..05902e26 100644 --- a/cmake/modules/FindGIO.cmake +++ b/cmake/modules/FindGIO.cmake @@ -1,5 +1,4 @@ -# - Try to find the GIO libraries -# Once done this will define +# Try to find the GIO libraries, once done this will define: # # GIO_FOUND - system has GIO # GIO_INCLUDE_DIR - the GIO include directory @@ -19,32 +18,35 @@ find_package(PkgConfig) pkg_check_modules(PC_LibGIO QUIET gio-2.0) find_path(GIO_MAIN_INCLUDE_DIR - NAMES glib.h - HINTS ${PC_LibGIO_INCLUDEDIR} - PATH_SUFFIXES glib-2.0) + NAMES glib.h + PATH_SUFFIXES glib-2.0 + HINTS ${PC_LibGIO_INCLUDEDIR} +) find_library(GIO_LIBRARIES - NAMES gio-2.0 - HINTS ${PC_LibGLIB2_LIBDIR}) - + NAMES gio-2.0 + HINTS ${PC_LibGLIB2_LIBDIR} +) get_filename_component(GIOLibDir "${GIO_LIBRARIES}" PATH) -find_path(GIO_INTERNAL_INCLUDE_DIR glibconfig.h - PATH_SUFFIXES glib-2.0/include - PATHS ${_LibGIOIncDir} "${GIOLibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH} - NO_DEFAULT_PATH) +find_path(GIO_INTERNAL_INCLUDE_DIR + NAMES glibconfig.h + PATH_SUFFIXES glib-2.0/include + HINTS ${_LibGIOIncDir} "${GIOLibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH} +) find_path(GIO_INTERNAL_INCLUDE_DIR glibconfig.h - PATH_SUFFIXES glib-2.0/include - PATHS ${_LibGIOIncDir} "${GIOLibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) + PATH_SUFFIXES glib-2.0/include + HINTS ${_LibGIOIncDir} "${GIOLibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH} +) set(GIO_INCLUDE_DIR "${GIO_MAIN_INCLUDE_DIR}") # not sure if this include dir is optional or required # for now it is optional if(GIO_INTERNAL_INCLUDE_DIR) - set(GIO_INCLUDE_DIR ${GIO_INCLUDE_DIR} "${GIO_INTERNAL_INCLUDE_DIR}") + set(GIO_INCLUDE_DIR ${GIO_INCLUDE_DIR} "${GIO_INTERNAL_INCLUDE_DIR}") endif(GIO_INTERNAL_INCLUDE_DIR) include(FindPackageHandleStandardArgs) diff --git a/cmake/modules/FindGLIB2.cmake b/cmake/modules/FindGLIB2.cmake index 09fd98d8..8849d486 100644 --- a/cmake/modules/FindGLIB2.cmake +++ b/cmake/modules/FindGLIB2.cmake @@ -1,5 +1,4 @@ -# - Try to find the GLIB2 libraries -# Once done this will define +# Try to find the GLIB2 libraries, once done this will define: # # GLIB2_FOUND - system has glib2 # GLIB2_INCLUDE_DIR - the glib2 include directory @@ -20,13 +19,14 @@ find_package(PkgConfig) pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) find_path(GLIB2_MAIN_INCLUDE_DIR - NAMES glib.h - HINTS ${PC_LibGLIB2_INCLUDEDIR} - PATH_SUFFIXES glib-2.0) + NAMES glib.h + PATH_SUFFIXES glib-2.0 + HINTS ${PC_LibGLIB2_INCLUDEDIR} +) find_library(GLIB2_LIBRARY - NAMES glib-2.0 - HINTS ${PC_LibGLIB2_LIBDIR} + NAMES glib-2.0 + HINTS ${PC_LibGLIB2_LIBDIR} ) set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) @@ -34,16 +34,18 @@ set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) # search the glibconfig.h include dir under the same root where the library is found get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) -find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h - PATH_SUFFIXES glib-2.0/include - HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) +find_path(GLIB2_INTERNAL_INCLUDE_DIR + NAMES glibconfig.h + PATH_SUFFIXES glib-2.0/include + HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH} +) set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") # not sure if this include dir is optional or required # for now it is optional if(GLIB2_INTERNAL_INCLUDE_DIR) - set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") + set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") endif(GLIB2_INTERNAL_INCLUDE_DIR) include(FindPackageHandleStandardArgs) diff --git a/cmake/modules/FindGMP.cmake b/cmake/modules/FindGMP.cmake index 291f7c3e..d8f6a69a 100644 --- a/cmake/modules/FindGMP.cmake +++ b/cmake/modules/FindGMP.cmake @@ -1,11 +1,10 @@ -# - Try to find GMP -# Once done this will define +# Try to find GMP, once done this will define: # # GMP_FOUND - system has GMP # GMP_INCLUDE_DIR - the GMP include directory # GMP_LIBRARIES - the libraries needed to use GMP # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindGSSAPI.cmake b/cmake/modules/FindGSSAPI.cmake index 6ecb6ede..82cb5ba2 100644 --- a/cmake/modules/FindGSSAPI.cmake +++ b/cmake/modules/FindGSSAPI.cmake @@ -1,12 +1,11 @@ -# - Try to detect the GSSAPI support -# Once done this will define +# Try to detect the GSSAPI support, once done this will define: # # GSSAPI_FOUND - system supports GSSAPI # GSSAPI_INCS - the GSSAPI include directory # GSSAPI_LIBS - the libraries needed to use GSSAPI # GSSAPI_FLAVOR - the type of API - MIT or HEIMDAL -# Copyright (c) 2006, Pino Toscano, +# Copyright (c) 2006 Pino Toscano # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindGettextPO.cmake b/cmake/modules/FindGettextPO.cmake index 8acc259a..29acbedb 100644 --- a/cmake/modules/FindGettextPO.cmake +++ b/cmake/modules/FindGettextPO.cmake @@ -1,31 +1,27 @@ -# - Try to find GettextPO -# -# Once done this will define +# Try to find GettextPO, once done this will define: # # GETTEXTPO_FOUND - System has GETTEXTPO # GETTEXTPO_INCLUDE_DIR - The GETTEXTPO include directory # GETTEXTPO_LIBRARY - The library needed to use GETTEXTPO - -# Copyright (c) 2012, Ni Hui -# Based off FindLibXml2.cmake from CMake 2.6.4 by Alexander Neundorf +# +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +find_path(GETTEXTPO_INCLUDE_DIR + NAMES gettext-po.h + HINTS $ENV{GETTEXTPODIR}/include +) -if(GETTEXTPO_INCLUDE_DIR AND GETTEXTPO_LIBRARY) - # in cache already - set(GETTEXTPO_FIND_QUIETLY TRUE) -endif(GETTEXTPO_INCLUDE_DIR AND GETTEXTPO_LIBRARY) - -find_path(GETTEXTPO_INCLUDE_DIR gettext-po.h) - -find_library(GETTEXTPO_LIBRARY NAMES gettextpo) +find_library(GETTEXTPO_LIBRARY + NAMES gettextpo + HINTS $ENV{GETTEXTPODIR}/lib +) include(FindPackageHandleStandardArgs) - -# handle the QUIETLY and REQUIRED arguments and set GETTEXTPO_FOUND to TRUE if -# all listed variables are TRUE -find_package_handle_standard_args(GettextPO DEFAULT_MSG GETTEXTPO_LIBRARY GETTEXTPO_INCLUDE_DIR) +find_package_handle_standard_args(GettextPO + REQUIRED_VARS GETTEXTPO_LIBRARY GETTEXTPO_INCLUDE_DIR +) mark_as_advanced(GETTEXTPO_INCLUDE_DIR GETTEXTPO_LIBRARY) diff --git a/cmake/modules/FindHUNSPELL.cmake b/cmake/modules/FindHUNSPELL.cmake index ec5f5c48..e0c44b77 100644 --- a/cmake/modules/FindHUNSPELL.cmake +++ b/cmake/modules/FindHUNSPELL.cmake @@ -1,13 +1,11 @@ -# - Try to find HUNSPELL -# -# Once done this will define +# Try to find HUNSPELL, once done this will define: # # HUNSPELL_FOUND - system has HUNSPELL # HUNSPELL_INCLUDE_DIR - the HUNSPELL include directory # HUNSPELL_LIBRARIES - the libraries needed to use HUNSPELL # HUNSPELL_DEFINITIONS - compiler switches required for using HUNSPELL # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindHUpnp.cmake b/cmake/modules/FindHUpnp.cmake index f5d61ef7..f9eb66b0 100644 --- a/cmake/modules/FindHUpnp.cmake +++ b/cmake/modules/FindHUpnp.cmake @@ -1,5 +1,4 @@ -# - Try to find HUPnP library -# Once done this will define +# Try to find HUPnP library, once done this will define: # # HUPNP_FOUND - system has HUPnP # HUPNP_INCLUDE_DIR - the LIBHUpnp include directory diff --git a/cmake/modules/FindIBus.cmake b/cmake/modules/FindIBus.cmake index 3c38fb80..8e4416b4 100644 --- a/cmake/modules/FindIBus.cmake +++ b/cmake/modules/FindIBus.cmake @@ -1,13 +1,11 @@ -# - Try to find IBUS -# -# Once done this will define +# Try to find IBUS, once done this will define: # # IBUS_FOUND - system has IBUS # IBUS_INCLUDE_DIR - the IBUS include directory # IBUS_LIBRARIES - the libraries needed to use IBUS # IBUS_DEFINITIONS - compiler switches required for using IBUS # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindKSane.cmake b/cmake/modules/FindKSane.cmake index bab0f560..97f7c48a 100644 --- a/cmake/modules/FindKSane.cmake +++ b/cmake/modules/FindKSane.cmake @@ -1,4 +1,4 @@ -# cmake macro to test if libksane is installed +# Try to find KSane, once done this will define: # # KSANE_FOUND - system has KSANE libs # KSANE_INCLUDE_DIR - the KSANE include directory diff --git a/cmake/modules/FindLIBPARTED.cmake b/cmake/modules/FindLIBPARTED.cmake index 99b33953..fd877af2 100644 --- a/cmake/modules/FindLIBPARTED.cmake +++ b/cmake/modules/FindLIBPARTED.cmake @@ -1,5 +1,3 @@ - - # Copyright (C) 2008,2010,2011 by Volker Lanz # # Redistribution and use in source and binary forms, with or without diff --git a/cmake/modules/FindLibATASmart.cmake b/cmake/modules/FindLibATASmart.cmake index eb803d6e..1c0f3252 100644 --- a/cmake/modules/FindLibATASmart.cmake +++ b/cmake/modules/FindLibATASmart.cmake @@ -1,12 +1,10 @@ -# - Try to find ATA library -# -# Once done this will define +# Try to find ATA library, once done this will define: # # LIBATASMART_FOUND - system has ATA library # LIBATASMART_INCLUDES - the ATA library include directory # LIBATASMART_LIBRARIES - the libraries needed to use ATA library # -# Copyright (c) 2021, Ivailo Monev, +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibAttica.cmake b/cmake/modules/FindLibAttica.cmake index d65ebb42..107fc506 100644 --- a/cmake/modules/FindLibAttica.cmake +++ b/cmake/modules/FindLibAttica.cmake @@ -1,12 +1,10 @@ -# Try to find the Attica library -# -# Once done this will define +# Try to find the Attica library, once done this will define: # # LIBATTICA_FOUND - system has Attica # LIBATTICA_LIBRARIES - the Attica include directory # LIBATTICA_INCLUDE_DIR - the libraries needed to use Attica # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibDRM.cmake b/cmake/modules/FindLibDRM.cmake index 12be3869..bc5d60ae 100644 --- a/cmake/modules/FindLibDRM.cmake +++ b/cmake/modules/FindLibDRM.cmake @@ -1,12 +1,10 @@ -# - Try to find libdrm library -# -# Once done this will define +# Try to find libdrm library, once done this will define: # # LIBDRM_FOUND - system has libdrm # LIBDRM_INCLUDE_DIR - the libdrm include directory # LIBDRM_LIBRARIES - the libraries needed to use libdrm # -# Copyright (c) 2021, Ivailo Monev, +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibGPS.cmake b/cmake/modules/FindLibGPS.cmake index fc0b963a..2445815f 100644 --- a/cmake/modules/FindLibGPS.cmake +++ b/cmake/modules/FindLibGPS.cmake @@ -1,12 +1,10 @@ -# - Try to find GPS library -# -# Once done this will define +# Try to find GPS library, once done this will define: # # LIBGPS_FOUND - system has GPS library # LIBGPS_INCLUDE_DIR - the GPS library include directory # LIBGPS_LIBRARIES - the libraries needed to use GPS library # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibGcrypt.cmake b/cmake/modules/FindLibGcrypt.cmake index dc4f88bd..730b1e62 100644 --- a/cmake/modules/FindLibGcrypt.cmake +++ b/cmake/modules/FindLibGcrypt.cmake @@ -1,12 +1,10 @@ -# - Try to find the libgcrypt library -# -# Once done this will define +# Try to find the libgcrypt library, once done this will define: # # LIBGCRYPT_FOUND - system has libgcrypt # LIBGCRYPT_INCLUDE_DIR - the libgcrypt include directory # LIBGCRYPT_LIBRARIES - the libraries needed to use libgcrypt # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibKonq.cmake b/cmake/modules/FindLibKonq.cmake index 4612d071..430542b7 100644 --- a/cmake/modules/FindLibKonq.cmake +++ b/cmake/modules/FindLibKonq.cmake @@ -1,12 +1,10 @@ -# - Try to find konqueror library -# -# Once done this will define +# Try to find konqueror library, once done this will define: # # LIBKONQ_FOUND - system has konqueror library # LIBKONQ_INCLUDE_DIR - the konqueror library include directory # LIBKONQ_LIBRARY - the konqueror library # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibLZMA.cmake b/cmake/modules/FindLibLZMA.cmake index 80993424..997f650c 100644 --- a/cmake/modules/FindLibLZMA.cmake +++ b/cmake/modules/FindLibLZMA.cmake @@ -1,12 +1,10 @@ -# - Try to find the LibLZMA -# -# Once done this will define +# Try to find the LibLZMA, once done this will define: # # LIBLZMA_FOUND - system has LibLZMA # LIBLZMA_INCLUDE_DIRS - the LibLZMA include directory # LIBLZMA_LIBRARIES - the libraries needed to use LibLZMA # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibMms.cmake b/cmake/modules/FindLibMms.cmake index 9cbe58be..583e7dfd 100644 --- a/cmake/modules/FindLibMms.cmake +++ b/cmake/modules/FindLibMms.cmake @@ -1,11 +1,10 @@ -# - Try to find the libmms library -# Once done this will define +# Try to find the libmms library, once done this will define: # # LIBMMS_FOUND - system has libmms # LIBMMS_INCLUDE_DIR - the libmms include directory # LIBMMS_LIBRARIES - the libraries needed to use libmms # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibRaw.cmake b/cmake/modules/FindLibRaw.cmake index 532bed12..c1b2e9fc 100644 --- a/cmake/modules/FindLibRaw.cmake +++ b/cmake/modules/FindLibRaw.cmake @@ -1,13 +1,11 @@ -# - Try to find LibRaw library -# -# Once done this will define +# Try to find LibRaw library, once done this will define: # # LIBRAW_FOUND - system has LibRaw # LIBRAW_INCLUDE_DIR - the LibRaw include directory # LIBRAW_LIBRARIES - the libraries needed to use LibRaw # LIBRAW_DEFINITIONS - compiler switches required for using LibRaw # -# Copyright (c) 2021, Ivailo Monev, +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibSSH.cmake b/cmake/modules/FindLibSSH.cmake index 36174dd8..e6fadd95 100644 --- a/cmake/modules/FindLibSSH.cmake +++ b/cmake/modules/FindLibSSH.cmake @@ -1,13 +1,11 @@ -# - Try to find LibSSH -# -# Once done this will define +# Try to find LibSSH, once done this will define: # # LIBSSH_FOUND - system has LibSSH # LIBSSH_INCLUDE_DIRS - the LibSSH include directory # LIBSSH_LIBRARIES - the libraries needed to use LibSSH # LIBSSH_DEFINITIONS - compiler switches required for using LibSSH # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibSpectre.cmake b/cmake/modules/FindLibSpectre.cmake index 3e63fcfd..14ab5d5f 100644 --- a/cmake/modules/FindLibSpectre.cmake +++ b/cmake/modules/FindLibSpectre.cmake @@ -1,12 +1,10 @@ -# - Try to find the libspectre PS library -# -# Once done this will define +# Try to find the libspectre PS library, once done this will define: # # LIBSPECTRE_FOUND - system has libspectre # LIBSPECTRE_INCLUDE_DIR - the libspectre include directory # LIBSPECTRE_LIBRARY - Link this to use libspectre # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibUSB.cmake b/cmake/modules/FindLibUSB.cmake index 11c383f6..177512e7 100644 --- a/cmake/modules/FindLibUSB.cmake +++ b/cmake/modules/FindLibUSB.cmake @@ -1,12 +1,10 @@ -# - Try to find libusb -# -# Once done this will define +# Try to find libusb, once done this will define: # # LIBUSB_FOUND - system has libusb # LIBUSB_INCLUDES - the libusb include directory # LIBUSB_LIBRARIES - the libraries needed to use libusb # -# Copyright (c) 2016-2020, Ivailo Monev, +# Copyright (c) 2016 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindLibXKlavier.cmake b/cmake/modules/FindLibXKlavier.cmake index 7afd77a3..bcf01e6a 100644 --- a/cmake/modules/FindLibXKlavier.cmake +++ b/cmake/modules/FindLibXKlavier.cmake @@ -1,29 +1,25 @@ -# - Try to find LibXKlavier -# Once done this will define +# Try to find LibXKlavier, once done this will define: # # LIBXKLAVIER_FOUND - system has LibXKlavier # LIBXKLAVIER_LDFLAGS - the libraries needed to use LibXKlavier # LIBXKLAVIER_CFLAGS - Compiler switches required for using LibXKlavier # LIBXKLAVIER_VERSION - Version of LibXKlavier +# +# Copyright (c) 2021 Ivailo Monev +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (LIBXKLAVIER_CFLAGS AND LIBXKLAVIER_LDFLAGS) +if(NOT WIN32) + include(FindPkgConfig) + pkg_check_modules(LIBXKLAVIER QUIET libxklavier>=3.0) +endif() - # in cache already - SET(LIBXKLAVIER_FOUND TRUE) -else (LIBXKLAVIER_CFLAGS AND LIBXKLAVIER_LDFLAGS) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibXKlavier + VERSION_VAR LIBXKLAVIER_VERSION + REQUIRED_VARS LIBXKLAVIER_CFLAGS LIBXKLAVIER_LDFLAGS +) - IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) - - pkg_check_modules(LIBXKLAVIER libxklavier>=3.0) - ENDIF (NOT WIN32) - - include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXKlavier DEFAULT_MSG LIBXKLAVIER_CFLAGS LIBXKLAVIER_LDFLAGS) - - MARK_AS_ADVANCED(LIBXKLAVIER_CFLAGS LIBXKLAVIER_LDFLAGS LIBXKLAVIER_VERSION) - -endif (LIBXKLAVIER_CFLAGS AND LIBXKLAVIER_LDFLAGS) +mark_as_advanced(LIBXKLAVIER_CFLAGS LIBXKLAVIER_LDFLAGS) diff --git a/cmake/modules/FindLibintl.cmake b/cmake/modules/FindLibintl.cmake index 52ae6479..2b8bce67 100644 --- a/cmake/modules/FindLibintl.cmake +++ b/cmake/modules/FindLibintl.cmake @@ -1,5 +1,4 @@ -# Try to find Libintl functionality -# Once done this will define +# Try to find Libintl functionality, once done this will define: # # LIBINTL_FOUND - system has Libintl # LIBINTL_INCLUDE_DIR - Libintl include directory diff --git a/cmake/modules/FindMPFR.cmake b/cmake/modules/FindMPFR.cmake index 9647e85a..dd0a688d 100644 --- a/cmake/modules/FindMPFR.cmake +++ b/cmake/modules/FindMPFR.cmake @@ -1,12 +1,10 @@ -# - Try to find MPFR -# -# Once done this will define +# Try to find MPFR, once done this will define: # # MPFR_FOUND - system has MPFR # MPFR_INCLUDE_DIR - the MPFR include directory # MPFR_LIBRARIES - the libraries needed to use MPFR # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindMPV.cmake b/cmake/modules/FindMPV.cmake index 9d00a2e9..cb5492fa 100644 --- a/cmake/modules/FindMPV.cmake +++ b/cmake/modules/FindMPV.cmake @@ -1,12 +1,10 @@ -# - Try to find MPV -# -# Once done this will define +# Try to find MPV, once done this will define: # # MPV_FOUND - system has MPV # MPV_INCLUDES - the MPV include directory # MPV_LIBRARIES - the libraries needed to use MPV # -# Copyright (c) 2015-2020, Ivailo Monev, +# Copyright (c) 2015 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindMtp.cmake b/cmake/modules/FindMtp.cmake index e313d674..8625332f 100644 --- a/cmake/modules/FindMtp.cmake +++ b/cmake/modules/FindMtp.cmake @@ -1,13 +1,11 @@ -# - Try to find the libmtp library -# -# Once done this will define +# Try to find the libmtp library, once done this will define: # # MTP_FOUND - system has libmtp # MTP_INCLUDE_DIR - the libmtp include directory # MTP_LIBRARIES - the libraries needed to use libmtp # MTP_DEFINITIONS - compiler switches required for using libmtp # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindNetworkManager.cmake b/cmake/modules/FindNetworkManager.cmake index 4ea8040b..7f4bf127 100644 --- a/cmake/modules/FindNetworkManager.cmake +++ b/cmake/modules/FindNetworkManager.cmake @@ -1,5 +1,4 @@ -# - Try to find NetworkManager -# Once done this will define +# Try to find NetworkManager, once done this will define: # # NETWORKMANAGER_FOUND - system has NetworkManager # NETWORKMANAGER_INCLUDE_DIRS - the NetworkManager include directories @@ -9,7 +8,7 @@ # Copyright (c) 2006, Alexander Neundorf, # Copyright (c) 2007, Will Stephenson, -# Copyright (c) 2015, Ivailo Monev, +# Copyright (c) 2015 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindOpenEXR.cmake b/cmake/modules/FindOpenEXR.cmake index 93b05dd9..1e4ac805 100644 --- a/cmake/modules/FindOpenEXR.cmake +++ b/cmake/modules/FindOpenEXR.cmake @@ -1,5 +1,4 @@ -# Try to find the OpenEXR libraries -# This check defines: +# Try to find the OpenEXR libraries, once done this will define: # # OPENEXR_FOUND - system has OpenEXR # OPENEXR_INCLUDE_DIR - OpenEXR include directory diff --git a/cmake/modules/FindOpenGLES.cmake b/cmake/modules/FindOpenGLES.cmake index 60b07e29..90b2253f 100644 --- a/cmake/modules/FindOpenGLES.cmake +++ b/cmake/modules/FindOpenGLES.cmake @@ -1,5 +1,4 @@ -# - Try to find OpenGLES -# Once done this will define +# Try to find OpenGLES, once done this will define: # # OPENGLES_FOUND - system has OpenGLES and EGL # OPENGL_EGL_FOUND - system has EGL @@ -9,44 +8,41 @@ # OPENGLES_EGL_LIBRARY - the EGL library # OPENGLES_LIBRARIES - all libraries needed for OpenGLES # OPENGLES_INCLUDES - all includes needed for OpenGLES +# +# Copyright (c) 2021 Ivailo Monev +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -FIND_PATH(OPENGLES_INCLUDE_DIR GLES2/gl2.h - /usr/openwin/share/include - /opt/graphics/OpenGL/include /usr/X11R6/include - /usr/include +find_path(OPENGLES_INCLUDE_DIR + NAMES GLES2/gl2.h + HINTS /usr/X11R7/include /usr/X11R6/include ) -FIND_LIBRARY(OPENGLES_LIBRARY - NAMES GLESv2 - PATHS /opt/graphics/OpenGL/lib - /usr/openwin/lib - /usr/shlib /usr/X11R6/lib - /usr/lib +find_library(OPENGLES_LIBRARY + NAMES GLESv2 + HINTS /usr/X11R7/lib /usr/X11R6/lib ) -FIND_PATH(OPENGLES_EGL_INCLUDE_DIR EGL/egl.h - /usr/openwin/share/include - /opt/graphics/OpenGL/include /usr/X11R6/include - /usr/include +find_path(OPENGLES_EGL_INCLUDE_DIR + NAMES EGL/egl.h + HINTS /usr/X11R7/include /usr/X11R6/include ) -FIND_LIBRARY(OPENGLES_EGL_LIBRARY +find_library(OPENGLES_EGL_LIBRARY NAMES EGL - PATHS /usr/shlib /usr/X11R6/lib - /usr/lib + HINTS /usr/X11R7/lib /usr/X11R6/lib ) -SET(OPENGL_EGL_FOUND "NO") -IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) - SET(OPENGL_EGL_FOUND "YES") -ENDIF() +set(OPENGL_EGL_FOUND "NO") +if(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) + set(OPENGL_EGL_FOUND "YES") +endif() -SET(OPENGLES_FOUND "NO") -IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND - OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) - SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES} - ${OPENGLES_EGL_LIBRARY}) - SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR}) - SET(OPENGLES_FOUND "YES") -ENDIF() +set(OPENGLES_FOUND "NO") +if(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) + set(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_EGL_LIBRARY}) + set(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR}) + set(OPENGLES_FOUND "YES") +endif() diff --git a/cmake/modules/FindPAM.cmake b/cmake/modules/FindPAM.cmake index 26325a12..a021d491 100644 --- a/cmake/modules/FindPAM.cmake +++ b/cmake/modules/FindPAM.cmake @@ -1,12 +1,11 @@ -# - Try to find the PAM libraries -# Once done this will define +# Try to find the PAM libraries, once done this will define: # # PAM_FOUND - system has pam # PAM_INCLUDE_DIR - the pam include directory # PAM_LIBRARIES - libpam library # PAM_MESSAGE_CONST - libpam pam_message struct is const # -# Copyright (c) 2021, Ivailo Monev, +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindPCIUTILS.cmake b/cmake/modules/FindPCIUTILS.cmake index eed37de4..fbd96674 100644 --- a/cmake/modules/FindPCIUTILS.cmake +++ b/cmake/modules/FindPCIUTILS.cmake @@ -1,12 +1,10 @@ -# - Try to find the pciutils directory library -# -# Once done this will define +# Try to find the pciutils directory library, once done this will define: # # PCIUTILS_FOUND - system has PCIUtils # PCIUTILS_INCLUDE_DIR - the PCIUTILS include directory # PCIUTILS_LIBRARIES - the libraries needed to use PCIUtils # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindPopplerQt4.cmake b/cmake/modules/FindPopplerQt4.cmake index 964ae831..46b98b75 100644 --- a/cmake/modules/FindPopplerQt4.cmake +++ b/cmake/modules/FindPopplerQt4.cmake @@ -1,13 +1,11 @@ -# - Try to find the Qt4 binding of the Poppler library -# -# Once done this will define +# Try to find the Qt4 binding of the Poppler library, once done this will define: # # POPPLER_QT4_FOUND - system has poppler-qt4 # POPPLER_QT4_INCLUDE_DIR - the poppler-qt4 include directory # POPPLER_QT4_LIBRARIES - the libraries needed to use poppler-qt4 # POPPLER_QT4_DEFINITIONS - compiler switches required for using poppler-qt4 # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindQCA2.cmake b/cmake/modules/FindQCA2.cmake index 5c728fa0..dbcf693b 100644 --- a/cmake/modules/FindQCA2.cmake +++ b/cmake/modules/FindQCA2.cmake @@ -1,13 +1,11 @@ -# - Try to find QCA2 (Qt Cryptography Architecture 2) -# -# Once done this will define +# Try to find QCA2 (Qt Cryptography Architecture 2), once done this will define: # # QCA2_FOUND - system has QCA2 # QCA2_INCLUDE_DIR - the QCA2 include directory # QCA2_LIBRARIES - the libraries needed to use QCA2 # QCA2_DEFINITIONS - compiler switches required for using QCA2 # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindQalculate.cmake b/cmake/modules/FindQalculate.cmake index fd7d25a5..dc576d5e 100644 --- a/cmake/modules/FindQalculate.cmake +++ b/cmake/modules/FindQalculate.cmake @@ -1,12 +1,10 @@ -# - Try to find Qalculate -# -# Once done this will define +# Try to find Qalculate, once done this will define: # # QALCULATE_FOUND - system has Qalculate # QALCULATE_INCLUDE_DIR - the Qalculate include directory # QALCULATE_LIBRARIES - the Qalculate libraries # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindRAW1394.cmake b/cmake/modules/FindRAW1394.cmake index b2c0d331..00f9ad94 100644 --- a/cmake/modules/FindRAW1394.cmake +++ b/cmake/modules/FindRAW1394.cmake @@ -1,12 +1,10 @@ -# - Try to find the raw1394 -# -# Once done this will define +# Try to find the raw1394, once done this will define: # # RAW1394_FOUND - system has raw1394 # RAW1394_INCLUDE_DIR - the raw1394 include directory # RAW1394_LIBRARIES - the libraries needed to use raw1394 # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindSCIM.cmake b/cmake/modules/FindSCIM.cmake index 50b72f19..4f477f03 100644 --- a/cmake/modules/FindSCIM.cmake +++ b/cmake/modules/FindSCIM.cmake @@ -1,12 +1,11 @@ -# - Try to find the SCIM -# Once done this will define +# Try to find the SCIM, once done this will define: # # SCIM_FOUND - system has SCIM # SCIM_INCLUDE_DIR - the SCIM include directory # SCIM_LIBRARIES - the libraries needed to use SCIM # SCIM_DEFINITIONS - compiler switches required for using SCIM # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindSamba.cmake b/cmake/modules/FindSamba.cmake index 41676eaf..1051300b 100644 --- a/cmake/modules/FindSamba.cmake +++ b/cmake/modules/FindSamba.cmake @@ -1,5 +1,4 @@ -# - Try to find the samba directory library -# Once done this will define +# Try to find the samba directory library, once done this will define: # # SAMBA_FOUND - system has SAMBA # SAMBA_INCLUDE_DIR - the SAMBA include directory diff --git a/cmake/modules/FindSane.cmake b/cmake/modules/FindSane.cmake index 64efa87a..39bb7f01 100644 --- a/cmake/modules/FindSane.cmake +++ b/cmake/modules/FindSane.cmake @@ -1,21 +1,28 @@ -# cmake macro to test if we use sane +# Try to find SANE, once done this will define: # # SANE_FOUND - system has SANE libs # SANE_INCLUDE_DIR - the SANE include directory # SANE_LIBRARIES - The libraries needed to use SANE - -# Copyright (c) 2006, Marcus Hufgard 2006 +# +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -FIND_PATH(SANE_INCLUDE_DIR sane/sane.h) - -FIND_LIBRARY(SANE_LIBRARY NAMES sane libsane - PATH_SUFFIXES sane +find_path(SANE_INCLUDE_DIR + NAMES sane/sane.h + HINTS $ENV{SANEDIR}/include ) -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sane DEFAULT_MSG SANE_LIBRARY SANE_INCLUDE_DIR ) +find_library(SANE_LIBRARY + NAMES sane + PATH_SUFFIXES sane + HINTS $ENV{SANEDIR}/lib +) -MARK_AS_ADVANCED(SANE_INCLUDE_DIR SANE_LIBRARY) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Sane + REQUIRED_VARS SANE_LIBRARY SANE_INCLUDE_DIR +) + +mark_as_advanced(SANE_INCLUDE_DIR SANE_LIBRARY) diff --git a/cmake/modules/FindSensors.cmake b/cmake/modules/FindSensors.cmake index 6da908d8..b655d72a 100644 --- a/cmake/modules/FindSensors.cmake +++ b/cmake/modules/FindSensors.cmake @@ -1,16 +1,28 @@ -# - Try to find the sensors directory library -# Once done this will define +# Try to find the sensors directory library, once done this will define: # # SENSORS_FOUND - system has SENSORS # SENSORS_INCLUDE_DIR - the SENSORS include directory # SENSORS_LIBRARIES - The libraries needed to use SENSORS +# +# Copyright (c) 2021 Ivailo Monev +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -FIND_PATH(SENSORS_INCLUDE_DIR sensors/sensors.h) +FIND_PATH(SENSORS_INCLUDE_DIR + NAMES sensors/sensors.h + HINTS $ENV{SENSORSDIR}/include +) -FIND_LIBRARY(SENSORS_LIBRARIES NAMES sensors) +FIND_LIBRARY(SENSORS_LIBRARIES + NAMES sensors + HINTS $ENV{SENSORSDIR}/lib +) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sensors DEFAULT_MSG SENSORS_INCLUDE_DIR SENSORS_LIBRARIES ) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sensors + REQUIRED_VARS SENSORS_LIBRARIES SENSORS_INCLUDE_DIR +) MARK_AS_ADVANCED(SENSORS_INCLUDE_DIR SENSORS_LIBRARIES) diff --git a/cmake/modules/FindSharedMimeInfo.cmake b/cmake/modules/FindSharedMimeInfo.cmake index b79fa209..46d314e7 100644 --- a/cmake/modules/FindSharedMimeInfo.cmake +++ b/cmake/modules/FindSharedMimeInfo.cmake @@ -1,6 +1,4 @@ -# - Try to find the shared-mime-info package -# -# Once done this will define +# Try to find the shared-mime-info package, once done this will define: # # SHAREDMIMEINFO_FOUND - system has the shared-mime-info package # UPDATE_MIME_DATABASE_EXECUTABLE - the update-mime-database executable @@ -9,7 +7,6 @@ # standard syntax, e.g. find_package(SharedMimeInfo 0.20) # # For backward compatibility, the following two variables are also supported: -# SHARED_MIME_INFO_FOUND - same as SHAREDMIMEINFO_FOUND # SHARED_MIME_INFO_MINIMUM_VERSION - set to the minimum version you need, default is 0.18. # When both are used, i.e. the version is set in the find_package() call and # SHARED_MIME_INFO_MINIMUM_VERSION is set, the version specified in the find_package() @@ -23,60 +20,54 @@ # Support SHARED_MIME_INFO_MINIMUM_VERSION for compatibility: if(NOT SharedMimeInfo_FIND_VERSION) - set(SharedMimeInfo_FIND_VERSION "${SHARED_MIME_INFO_MINIMUM_VERSION}") -endif(NOT SharedMimeInfo_FIND_VERSION) + set(SharedMimeInfo_FIND_VERSION "${SHARED_MIME_INFO_MINIMUM_VERSION}") +endif() # the minimum version of shared-mime-database we require if(NOT SharedMimeInfo_FIND_VERSION) - set(SharedMimeInfo_FIND_VERSION "0.18") -endif(NOT SharedMimeInfo_FIND_VERSION) + set(SharedMimeInfo_FIND_VERSION "0.18") +endif() find_program (UPDATE_MIME_DATABASE_EXECUTABLE NAMES update-mime-database) # Store the version number in the cache, so we don't have to search the next time again: if (UPDATE_MIME_DATABASE_EXECUTABLE AND NOT SHAREDMIMEINFO_VERSION) - execute_process( COMMAND ${UPDATE_MIME_DATABASE_EXECUTABLE} -v RETURN_VALUE _null ERROR_VARIABLE _smiVersionRaw OUTPUT_QUIET - ) + ) string(REGEX REPLACE "update-mime-database \\([a-zA-Z\\-]+\\) ([0-9]\\.[0-9]+).*" "\\1" smiVersion "${_smiVersionRaw}") set(SHAREDMIMEINFO_VERSION "${smiVersion}" CACHE STRING "Version number of SharedMimeInfo" FORCE) -endif (UPDATE_MIME_DATABASE_EXECUTABLE AND NOT SHAREDMIMEINFO_VERSION) +endif() # Use the new FPHSA() syntax: include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SharedMimeInfo REQUIRED_VARS UPDATE_MIME_DATABASE_EXECUTABLE - VERSION_VAR SHAREDMIMEINFO_VERSION ) - -# For backward compatibility: -set(SHARED_MIME_INFO_FOUND ${SHAREDMIMEINFO_FOUND} ) - -# message(FATAL_ERROR "Could NOT find shared-mime-info. See http://freedesktop.org/wiki/Software/shared-mime-info.") - +find_package_handle_standard_args(SharedMimeInfo + VERSION_VAR SHAREDMIMEINFO_VERSION + REQUIRED_VARS UPDATE_MIME_DATABASE_EXECUTABLE +) mark_as_advanced(UPDATE_MIME_DATABASE_EXECUTABLE) - macro(UPDATE_XDG_MIMETYPES _path) - get_filename_component(_xdgmimeDir "${_path}" NAME) - if("${_xdgmimeDir}" STREQUAL packages ) - get_filename_component(_xdgmimeDir "${_path}" PATH) - else("${_xdgmimeDir}" STREQUAL packages ) - set(_xdgmimeDir "${_path}") - endif("${_xdgmimeDir}" STREQUAL packages ) + get_filename_component(_xdgmimeDir "${_path}" NAME) + if("${_xdgmimeDir}" STREQUAL packages ) + get_filename_component(_xdgmimeDir "${_path}" PATH) + else("${_xdgmimeDir}" STREQUAL packages ) + set(_xdgmimeDir "${_path}") + endif("${_xdgmimeDir}" STREQUAL packages ) - install(CODE " + install(CODE " set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") if (NOT DESTDIR_VALUE) # under Windows relative paths are used, that's why it runs from CMAKE_INSTALL_PREFIX execute_process(COMMAND ${UPDATE_MIME_DATABASE_EXECUTABLE} ${_xdgmimeDir} WORKING_DIRECTORY \"${CMAKE_INSTALL_PREFIX}\") -endif (NOT DESTDIR_VALUE) +endif() ") -endmacro (UPDATE_XDG_MIMETYPES) +endmacro() diff --git a/cmake/modules/FindSpeechd.cmake b/cmake/modules/FindSpeechd.cmake index 91089790..46242b87 100644 --- a/cmake/modules/FindSpeechd.cmake +++ b/cmake/modules/FindSpeechd.cmake @@ -1,6 +1,4 @@ -# - Try to find speech-dispatcher -# -# Once done this will define +# Try to find speech-dispatcher, once done this will define: # # SPEECHD_FOUND - system has speech-dispatcher # SPEECHD_INCLUDE_DIR - the speech-dispatcher include directory diff --git a/cmake/modules/FindSqlite.cmake b/cmake/modules/FindSqlite.cmake index 042f91e4..7bab45fd 100644 --- a/cmake/modules/FindSqlite.cmake +++ b/cmake/modules/FindSqlite.cmake @@ -1,12 +1,10 @@ -# - Try to find Sqlite -# -# Once done this will define +# Try to find Sqlite, once done this will define: # # SQLITE_FOUND - system has Sqlite # SQLITE_INCLUDE_DIR - the Sqlite include directory # SQLITE_LIBRARIES - the libraries needed to use Sqlite # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindStrigi.cmake b/cmake/modules/FindStrigi.cmake index f124b21e..6c294f18 100644 --- a/cmake/modules/FindStrigi.cmake +++ b/cmake/modules/FindStrigi.cmake @@ -1,13 +1,11 @@ -# - Try to find Strigi -# -# Once done this will define +# Try to find Strigi, once done this will define: # # STRIGI_FOUND - system has Strigi # STRIGI_INCLUDE_DIR - the Strigi include directory # STRIGI_STREAMS_LIBRARY - the libraries needed to use Strigi streams # STRIGI_STREAMANALYZER_LIBRARY - the libraries needed to use Strigi stream analyzer # -# Copyright (c) 2021, Ivailo Monev, +# Copyright (c) 2021 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. @@ -39,6 +37,8 @@ if(NOT STRIGI_INCLUDE_DIR OR NOT STRIGI_STREAMS_LIBRARY OR NOT STRIGI_STREAMANAL NAMES streamanalyzer HINTS $ENV{STRIGIDIR}/lib ) +else() + link_directories(${PC_LIBSTREAMS_LIBDIR} ${PC_LIBSTREAMANALYZER_LIBDIR}) endif() include(FindPackageHandleStandardArgs) diff --git a/cmake/modules/FindSudo.cmake b/cmake/modules/FindSudo.cmake index 20d3f5ca..7ddb7b69 100644 --- a/cmake/modules/FindSudo.cmake +++ b/cmake/modules/FindSudo.cmake @@ -1,19 +1,22 @@ -# - Try to find Sudo -# Once done this will define +# Try to find Sudo, once done this will define: # # SUDO_FOUND - sudo has been found # SUDO_EXECUTABLE - the sudo executable path # +# Copyright (c) 2021 Ivailo Monev +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. -find_program(SUDO_EXECUTABLE NAMES sudo +find_program(SUDO_EXECUTABLE + NAMES sudo HINTS ${KDE4_BIN_INSTALL_DIR} DOC "sudo -- execute a command as another user" ) -if(SUDO_EXECUTABLE) - set(SUDO_FOUND TRUE) - message(STATUS "Found Sudo: ${SUDO_EXECUTABLE}") -else(SUDO_EXECUTABLE) - set(SUDO_FOUND FALSE) - message(STATUS "Sudo not found.") -endif(SUDO_EXECUTABLE) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Sudo + REQUIRED_VARS SUDO_EXECUTABLE +) + +mark_as_advanced(SUDO_EXECUTABLE) diff --git a/cmake/modules/FindTaglib.cmake b/cmake/modules/FindTaglib.cmake index d0f8c504..e310f1ae 100644 --- a/cmake/modules/FindTaglib.cmake +++ b/cmake/modules/FindTaglib.cmake @@ -1,12 +1,10 @@ -# - Try to find the Taglib -# -# Once done this will define +# Try to find the Taglib, once done this will define: # # TAGLIB_FOUND - system has Taglib # TAGLIB_LIBRARIES - the libraries needed to use Taglib # TAGLIB_CFLAGS - the Taglib C flags # -# Copyright (c) 2020, Ivailo Monev, +# Copyright (c) 2020 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindUDev.cmake b/cmake/modules/FindUDev.cmake index f2131d35..4be8c532 100644 --- a/cmake/modules/FindUDev.cmake +++ b/cmake/modules/FindUDev.cmake @@ -1,5 +1,4 @@ -# - Try to find UDev -# Once done this will define +# Try to find UDev, once done this will define: # # UDEV_FOUND - system has UDev # UDEV_INCLUDE_DIR - the libudev include directory diff --git a/cmake/modules/FindWebP.cmake b/cmake/modules/FindWebP.cmake index aba176d5..da472541 100644 --- a/cmake/modules/FindWebP.cmake +++ b/cmake/modules/FindWebP.cmake @@ -1,12 +1,10 @@ -# - Try to find libwebp -# -# Once done this will define +# Try to find libwebp, once done this will define: # # WEBP_FOUND - system has libwebp # WEBP_INCLUDES - the libwebp include directory # WEBP_LIBRARIES - the libraries needed to use libwebp # -# Copyright (c) 2015-2020, Ivailo Monev, +# Copyright (c) 2015 Ivailo Monev # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/cmake/modules/FindX11_XCB.cmake b/cmake/modules/FindX11_XCB.cmake index 677ce02d..aa417e35 100644 --- a/cmake/modules/FindX11_XCB.cmake +++ b/cmake/modules/FindX11_XCB.cmake @@ -1,5 +1,4 @@ -# - Try to find libX11-xcb -# Once done this will define +# Try to find libX11-xcb, once done this will define: # # X11_XCB_FOUND - system has libX11-xcb # X11_XCB_LIBRARIES - Link these to use libX11-xcb diff --git a/cmake/modules/FindXCB.cmake b/cmake/modules/FindXCB.cmake index 859819f7..9e702dee 100644 --- a/cmake/modules/FindXCB.cmake +++ b/cmake/modules/FindXCB.cmake @@ -1,6 +1,4 @@ -# Try to find XCB on a Unix system -# -# This will define: +# Try to find XCB on a Unix system, once done this will define: # # XCB_FOUND - True if xcb is available # XCB_LIBRARIES - Link these to use xcb @@ -31,83 +29,89 @@ IF (NOT WIN32) - IF (XCB_INCLUDE_DIR AND XCB_LIBRARIES) - # In the cache already - SET(XCB_FIND_QUIETLY TRUE) - ENDIF (XCB_INCLUDE_DIR AND XCB_LIBRARIES) + IF (XCB_INCLUDE_DIR AND XCB_LIBRARIES) + # In the cache already + SET(XCB_FIND_QUIETLY TRUE) + ENDIF () - # Use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - FIND_PACKAGE(PkgConfig) - PKG_CHECK_MODULES(PKG_XCB QUIET xcb xcb-util xcb-composite xcb-xfixes xcb-damage xcb-render xcb-randr - xcb-shape xcb-dri2 xcb-glx xcb-shm xcb-xv xcb-sync xcb-record - xcb-xtest xcb-icccm xcb-ewmh xcb-image xcb-renderutil xcb-keysyms) + # Use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PKG_XCB QUIET + xcb xcb-util xcb-composite xcb-xfixes xcb-damage xcb-render xcb-randr + xcb-shape xcb-dri2 xcb-glx xcb-shm xcb-xv xcb-sync xcb-record + xcb-xtest xcb-icccm xcb-ewmh xcb-image xcb-renderutil xcb-keysyms + ) - SET(XCB_DEFINITIONS ${PKG_XCB_CFLAGS}) + SET(XCB_DEFINITIONS ${PKG_XCB_CFLAGS}) - FIND_PATH(XCB_XCB_INCLUDE_DIR NAMES xcb/xcb.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_COMPOSITE_INCLUDE_DIR NAMES xcb/composite.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_XFIXES_INCLUDE_DIR NAMES xcb/xfixes.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_DAMAGE_INCLUDE_DIR NAMES xcb/damage.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_RENDER_INCLUDE_DIR NAMES xcb/render.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_RANDR_INCLUDE_DIR NAMES xcb/randr.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_SHAPE_INCLUDE_DIR NAMES xcb/shape.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_SHM_INCLUDE_DIR NAMES xcb/shm.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_SYNC_INCLUDE_DIR NAMES xcb/sync.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_IMAGE_INCLUDE_DIR NAMES xcb/xcb_image.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_RENDERUTIL_INCLUDE_DIR NAMES xcb/xcb_renderutil.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_KEYSYMS_INCLUDE_DIR NAMES xcb/xcb_keysyms.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_XTEST_INCLUDE_DIR NAMES xcb/xtest.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_PATH(XCB_RECORD_INCLUDE_DIR NAMES xcb/record.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_XCB_INCLUDE_DIR NAMES xcb/xcb.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_COMPOSITE_INCLUDE_DIR NAMES xcb/composite.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_XFIXES_INCLUDE_DIR NAMES xcb/xfixes.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_DAMAGE_INCLUDE_DIR NAMES xcb/damage.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_RENDER_INCLUDE_DIR NAMES xcb/render.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_RANDR_INCLUDE_DIR NAMES xcb/randr.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_SHAPE_INCLUDE_DIR NAMES xcb/shape.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_SHM_INCLUDE_DIR NAMES xcb/shm.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_SYNC_INCLUDE_DIR NAMES xcb/sync.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_IMAGE_INCLUDE_DIR NAMES xcb/xcb_image.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_RENDERUTIL_INCLUDE_DIR NAMES xcb/xcb_renderutil.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_KEYSYMS_INCLUDE_DIR NAMES xcb/xcb_keysyms.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_XTEST_INCLUDE_DIR NAMES xcb/xtest.h HINTS ${PKG_XCB_INCLUDE_DIRS}) + FIND_PATH(XCB_RECORD_INCLUDE_DIR NAMES xcb/record.h HINTS ${PKG_XCB_INCLUDE_DIRS}) - FIND_LIBRARY(XCB_XCB_LIBRARIES NAMES xcb HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_COMPOSITE_LIBRARIES NAMES xcb-composite HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_DAMAGE_LIBRARIES NAMES xcb-damage HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_XFIXES_LIBRARIES NAMES xcb-xfixes HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_RENDER_LIBRARIES NAMES xcb-render HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_RANDR_LIBRARIES NAMES xcb-randr HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_SHAPE_LIBRARIES NAMES xcb-shape HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_SHM_LIBRARIES NAMES xcb-shm HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_SYNC_LIBRARIES NAMES xcb-sync HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_IMAGE_LIBRARIES NAMES xcb-image HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_RENDERUTIL_LIBRARIES NAMES xcb-render-util HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_KEYSYMS_LIBRARIES NAMES xcb-keysyms HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_XTEST_LIBRARIES NAMES xcb-xtest HINTS ${PKG_XCB_LIBRARY_DIRS}) - FIND_LIBRARY(XCB_RECORD_LIBRARIES NAMES xcb-record HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_XCB_LIBRARIES NAMES xcb HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_COMPOSITE_LIBRARIES NAMES xcb-composite HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_DAMAGE_LIBRARIES NAMES xcb-damage HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_XFIXES_LIBRARIES NAMES xcb-xfixes HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_RENDER_LIBRARIES NAMES xcb-render HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_RANDR_LIBRARIES NAMES xcb-randr HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_SHAPE_LIBRARIES NAMES xcb-shape HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_SHM_LIBRARIES NAMES xcb-shm HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_SYNC_LIBRARIES NAMES xcb-sync HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_IMAGE_LIBRARIES NAMES xcb-image HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_RENDERUTIL_LIBRARIES NAMES xcb-render-util HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_KEYSYMS_LIBRARIES NAMES xcb-keysyms HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_XTEST_LIBRARIES NAMES xcb-xtest HINTS ${PKG_XCB_LIBRARY_DIRS}) + FIND_LIBRARY(XCB_RECORD_LIBRARIES NAMES xcb-record HINTS ${PKG_XCB_LIBRARY_DIRS}) - set(XCB_INCLUDE_DIR ${XCB_XCB_INCLUDE_DIR} ${XCB_COMPOSITE_INCLUDE_DIR} ${XCB_XFIXES_INCLUDE_DIR} - ${XCB_DAMAGE_INCLUDE_DIR} ${XCB_RENDER_INCLUDE_DIR} ${XCB_RANDR_INCLUDE_DIR} - ${XCB_SHAPE_INCLUDE_DIR} ${XCB_SHM_INCLUDE_DIR} ${XCB_SYNC_INCLUDE_DIR} - ${XCB_IMAGE_INCLUDE_DIR} ${XCB_RENDERUTIL_INCLUDE_DIR} ${XCB_KEYSYMS_INCLUDE_DIR} - ${XCB_XTEST_INCLUDE_DIR} ${XCB_RECORD_INCLUDE_DIR}) + set(XCB_INCLUDE_DIR + ${XCB_XCB_INCLUDE_DIR} ${XCB_COMPOSITE_INCLUDE_DIR} ${XCB_XFIXES_INCLUDE_DIR} + ${XCB_DAMAGE_INCLUDE_DIR} ${XCB_RENDER_INCLUDE_DIR} ${XCB_RANDR_INCLUDE_DIR} + ${XCB_SHAPE_INCLUDE_DIR} ${XCB_SHM_INCLUDE_DIR} ${XCB_SYNC_INCLUDE_DIR} + ${XCB_IMAGE_INCLUDE_DIR} ${XCB_RENDERUTIL_INCLUDE_DIR} ${XCB_KEYSYMS_INCLUDE_DIR} + ${XCB_XTEST_INCLUDE_DIR} ${XCB_RECORD_INCLUDE_DIR} + ) - set(XCB_LIBRARIES ${XCB_XCB_LIBRARIES} ${XCB_COMPOSITE_LIBRARIES} ${XCB_XFIXES_LIBRARIES} - ${XCB_DAMAGE_LIBRARIES} ${XCB_RENDER_LIBRARIES} ${XCB_RANDR_LIBRARIES} - ${XCB_SHAPE_LIBRARIES} ${XCB_SHM_LIBRARIES} ${XCB_SYNC_LIBRARIES} - ${XCB_IMAGE_LIBRARIES} ${XCB_RENDERUTIL_LIBRARIES} ${XCB_KEYSYMS_LIBRARIES} - ${XCB_XTEST_LIBRARIES} ${XCB_RECORD_LIBRARIES}) + set(XCB_LIBRARIES + ${XCB_XCB_LIBRARIES} ${XCB_COMPOSITE_LIBRARIES} ${XCB_XFIXES_LIBRARIES} + ${XCB_DAMAGE_LIBRARIES} ${XCB_RENDER_LIBRARIES} ${XCB_RANDR_LIBRARIES} + ${XCB_SHAPE_LIBRARIES} ${XCB_SHM_LIBRARIES} ${XCB_SYNC_LIBRARIES} + ${XCB_IMAGE_LIBRARIES} ${XCB_RENDERUTIL_LIBRARIES} ${XCB_KEYSYMS_LIBRARIES} + ${XCB_XTEST_LIBRARIES} ${XCB_RECORD_LIBRARIES} + ) - list(REMOVE_DUPLICATES XCB_INCLUDE_DIR) + list(REMOVE_DUPLICATES XCB_INCLUDE_DIR) - include(FindPackageHandleStandardArgs) + include(FindPackageHandleStandardArgs) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XCB DEFAULT_MSG XCB_XCB_LIBRARIES XCB_XCB_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_COMPOSITE DEFAULT_MSG XCB_COMPOSITE_LIBRARIES XCB_COMPOSITE_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_DAMAGE DEFAULT_MSG XCB_DAMAGE_LIBRARIES XCB_DAMAGE_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XFIXES DEFAULT_MSG XCB_XFIXES_LIBRARIES XCB_XFIXES_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RENDER DEFAULT_MSG XCB_RENDER_LIBRARIES XCB_RENDER_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RANDR DEFAULT_MSG XCB_RANDR_LIBRARIES XCB_RANDR_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SHAPE DEFAULT_MSG XCB_SHAPE_LIBRARIES XCB_SHAPE_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SHM DEFAULT_MSG XCB_SHM_LIBRARIES XCB_SHM_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SYNC DEFAULT_MSG XCB_SYNC_LIBRARIES XCB_SYNC_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_IMAGE DEFAULT_MSG XCB_IMAGE_LIBRARIES XCB_IMAGE_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RENDERUTIL DEFAULT_MSG XCB_RENDERUTIL_LIBRARIES XCB_RENDERUTIL_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_KEYSYMS DEFAULT_MSG XCB_KEYSYMS_LIBRARIES XCB_KEYSYMS_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XTEST DEFAULT_MSG XCB_XTEST_LIBRARIES XCB_XTEST_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RECORD DEFAULT_MSG XCB_RECORD_LIBRARIES XCB_RECORD_INCLUDE_DIR) - FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XCB DEFAULT_MSG XCB_XCB_LIBRARIES XCB_XCB_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_COMPOSITE DEFAULT_MSG XCB_COMPOSITE_LIBRARIES XCB_COMPOSITE_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_DAMAGE DEFAULT_MSG XCB_DAMAGE_LIBRARIES XCB_DAMAGE_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XFIXES DEFAULT_MSG XCB_XFIXES_LIBRARIES XCB_XFIXES_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RENDER DEFAULT_MSG XCB_RENDER_LIBRARIES XCB_RENDER_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RANDR DEFAULT_MSG XCB_RANDR_LIBRARIES XCB_RANDR_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SHAPE DEFAULT_MSG XCB_SHAPE_LIBRARIES XCB_SHAPE_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SHM DEFAULT_MSG XCB_SHM_LIBRARIES XCB_SHM_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_SYNC DEFAULT_MSG XCB_SYNC_LIBRARIES XCB_SYNC_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_IMAGE DEFAULT_MSG XCB_IMAGE_LIBRARIES XCB_IMAGE_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RENDERUTIL DEFAULT_MSG XCB_RENDERUTIL_LIBRARIES XCB_RENDERUTIL_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_KEYSYMS DEFAULT_MSG XCB_KEYSYMS_LIBRARIES XCB_KEYSYMS_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_XTEST DEFAULT_MSG XCB_XTEST_LIBRARIES XCB_XTEST_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB_RECORD DEFAULT_MSG XCB_RECORD_LIBRARIES XCB_RECORD_INCLUDE_DIR) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIR) - MARK_AS_ADVANCED( + MARK_AS_ADVANCED( XCB_INCLUDE_DIR XCB_LIBRARIES XCB_XCB_INCLUDE_DIR XCB_XCB_LIBRARIES XCB_COMPOSITE_INCLUDE_DIR XCB_COMPOSITE_LIBRARIES @@ -123,6 +127,5 @@ IF (NOT WIN32) XCB_KEYSYMS_INCLUDE_DIR XCB_KEYSYMS_LIBRARIES XCB_XTEST_INCLUDE_DIR XCB_XTEST_LIBRARIES XCB_RECORD_INCLUDE_DIR XCB_RECORD_LIBRARIES - ) - + ) ENDIF (NOT WIN32)