aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMarkus Härer <markus.haerer@gmx.net>2024-03-09 17:59:05 +0100
committerGitHub <noreply@github.com>2024-03-09 17:59:05 +0100
commit4ddc576847c1ce6cc24d0957ab0abf50bcba07c8 (patch)
tree7b222da11e5039108f710fe283b7bbed2044cc21 /cmake
parent4a9cb641fb9a418e9c93732155e2fe29c2f74e9a (diff)
parent5f6b42fd111b28d5571923152c47e7094de5e3cd (diff)
Merge pull request #24755 from fuzzard/cmake_fixups_standardisation
[cmake] Find Module cleanup and modernisation
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindAcbAPI.cmake12
-rw-r--r--cmake/modules/FindAlsa.cmake11
-rw-r--r--cmake/modules/FindBluray.cmake17
-rw-r--r--cmake/modules/FindCdio.cmake8
-rw-r--r--cmake/modules/FindCurl.cmake8
-rw-r--r--cmake/modules/FindEpollShim.cmake8
-rw-r--r--cmake/modules/FindFriBidi.cmake6
-rw-r--r--cmake/modules/FindGLU.cmake6
-rw-r--r--cmake/modules/FindGLX.cmake6
-rw-r--r--cmake/modules/FindGnuTLS.cmake6
-rw-r--r--cmake/modules/FindIso9660pp.cmake21
-rw-r--r--cmake/modules/FindKissFFT.cmake4
-rw-r--r--cmake/modules/FindLCMS2.cmake11
-rw-r--r--cmake/modules/FindLibAndroidJNI.cmake2
-rw-r--r--cmake/modules/FindLibDRM.cmake15
-rw-r--r--cmake/modules/FindLibDisplayInfo.cmake6
-rw-r--r--cmake/modules/FindLibDovi.cmake6
-rw-r--r--cmake/modules/FindLibInput.cmake6
-rw-r--r--cmake/modules/FindLibUSB.cmake4
-rw-r--r--cmake/modules/FindLircClient.cmake6
-rw-r--r--cmake/modules/FindMariaDBClient.cmake8
-rw-r--r--cmake/modules/FindMicroHttpd.cmake19
-rw-r--r--cmake/modules/FindMySqlClient.cmake2
-rw-r--r--cmake/modules/FindNFS.cmake12
-rw-r--r--cmake/modules/FindPCRE.cmake1
-rw-r--r--cmake/modules/FindPipewire.cmake17
-rw-r--r--cmake/modules/FindPlayerAPIs.cmake15
-rw-r--r--cmake/modules/FindPlayerFactory.cmake15
-rw-r--r--cmake/modules/FindPlist.cmake4
-rw-r--r--cmake/modules/FindPulseAudio.cmake15
-rw-r--r--cmake/modules/FindSmbClient.cmake6
-rw-r--r--cmake/modules/FindSqlite3.cmake4
-rw-r--r--cmake/modules/FindTinyXML.cmake8
-rw-r--r--cmake/modules/FindUDEV.cmake4
-rw-r--r--cmake/modules/FindUUID.cmake7
-rw-r--r--cmake/modules/FindVAAPI.cmake18
-rw-r--r--cmake/modules/FindVDPAU.cmake4
-rw-r--r--cmake/modules/FindWaylandProtocols.cmake1
-rw-r--r--cmake/modules/FindWaylandProtocolsWebOS.cmake2
-rw-r--r--cmake/modules/FindWaylandpp.cmake17
-rw-r--r--cmake/modules/FindWebOSHelpers.cmake15
-rw-r--r--cmake/modules/FindX.cmake6
-rw-r--r--cmake/modules/FindXRandR.cmake4
-rw-r--r--cmake/modules/FindXSLT.cmake6
-rw-r--r--cmake/modules/FindXkbcommon.cmake4
-rw-r--r--cmake/modules/buildtools/FindGtest.cmake20
-rw-r--r--cmake/platform/linux/gbm.cmake2
-rw-r--r--cmake/platform/linux/wayland.cmake2
-rw-r--r--cmake/platform/linux/webos.cmake2
-rw-r--r--cmake/platform/linux/x11.cmake2
50 files changed, 273 insertions, 138 deletions
diff --git a/cmake/modules/FindAcbAPI.cmake b/cmake/modules/FindAcbAPI.cmake
index 25575b4997..04f2de389f 100644
--- a/cmake/modules/FindAcbAPI.cmake
+++ b/cmake/modules/FindAcbAPI.cmake
@@ -14,11 +14,11 @@ if(NOT TARGET ACBAPI::ACBAPI)
endif()
find_path(ACBAPI_INCLUDE_DIR NAMES appswitching-control-block/AcbAPI.h
- PATHS ${PC_ACBAPI_INCLUDEDIR}
- NO_CACHE)
+ HINTS ${PC_ACBAPI_INCLUDEDIR}
+ NO_CACHE)
find_library(ACBAPI_LIBRARY NAMES AcbAPI
- PATHS ${PC_ACBAPI_LIBDIR}
- NO_CACHE)
+ HINTS ${PC_ACBAPI_LIBDIR}
+ NO_CACHE)
set(ACBAPI_VERSION ${PC_ACBAPI_VERSION})
@@ -30,8 +30,8 @@ if(NOT TARGET ACBAPI::ACBAPI)
if(ACBAPI_FOUND)
add_library(ACBAPI::ACBAPI UNKNOWN IMPORTED)
set_target_properties(ACBAPI::ACBAPI PROPERTIES
- IMPORTED_LOCATION "${ACBAPI_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${ACBAPI_INCLUDE_DIR}")
+ IMPORTED_LOCATION "${ACBAPI_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${ACBAPI_INCLUDE_DIR}")
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP ACBAPI::ACBAPI)
# creates an empty library to install on webOS 5+ devices
diff --git a/cmake/modules/FindAlsa.cmake b/cmake/modules/FindAlsa.cmake
index 786ec924bb..baec0bd86f 100644
--- a/cmake/modules/FindAlsa.cmake
+++ b/cmake/modules/FindAlsa.cmake
@@ -9,8 +9,17 @@
if(NOT TARGET ALSA::ALSA)
find_package(PkgConfig)
+
+ if(Alsa_FIND_VERSION)
+ if(Alsa_FIND_VERSION_EXACT)
+ set(Alsa_FIND_SPEC "=${Alsa_FIND_VERSION_COMPLETE}")
+ else()
+ set(Alsa_FIND_SPEC ">=${Alsa_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_ALSA alsa>=1.0.27 QUIET)
+ pkg_check_modules(PC_ALSA alsa${Alsa_FIND_SPEC} QUIET)
endif()
find_path(ALSA_INCLUDE_DIR NAMES alsa/asoundlib.h
diff --git a/cmake/modules/FindBluray.cmake b/cmake/modules/FindBluray.cmake
index 34bc50ef54..6f1d5dc6ad 100644
--- a/cmake/modules/FindBluray.cmake
+++ b/cmake/modules/FindBluray.cmake
@@ -14,14 +14,23 @@
#
# Bluray::Bluray - The libbluray library
-set(Bluray_FIND_VERSION 0.9.3)
+if(Bluray_FIND_VERSION)
+ if(Bluray_FIND_VERSION_EXACT)
+ set(Bluray_FIND_SPEC "=${Bluray_FIND_VERSION_COMPLETE}")
+ else()
+ set(Bluray_FIND_SPEC ">=${Bluray_FIND_VERSION_COMPLETE}")
+ endif()
+endif()
+
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_BLURAY libbluray>=${Bluray_FIND_VERSION} QUIET)
+ pkg_check_modules(PC_BLURAY libbluray${Bluray_FIND_SPEC} QUIET)
set(BLURAY_VERSION ${PC_BLURAY_VERSION})
endif()
find_path(BLURAY_INCLUDE_DIR libbluray/bluray.h
- PATHS ${PC_BLURAY_INCLUDEDIR})
+ HINTS ${PC_BLURAY_INCLUDEDIR})
if(NOT BLURAY_VERSION AND EXISTS ${BLURAY_INCLUDE_DIR}/libbluray/bluray-version.h)
file(STRINGS ${BLURAY_INCLUDE_DIR}/libbluray/bluray-version.h _bluray_version_str
@@ -31,7 +40,7 @@ if(NOT BLURAY_VERSION AND EXISTS ${BLURAY_INCLUDE_DIR}/libbluray/bluray-version.
endif()
find_library(BLURAY_LIBRARY NAMES bluray libbluray
- PATHS ${PC_BLURAY_LIBDIR})
+ HINTS ${PC_BLURAY_LIBDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Bluray
diff --git a/cmake/modules/FindCdio.cmake b/cmake/modules/FindCdio.cmake
index 3a10b063f7..16a7aef9c6 100644
--- a/cmake/modules/FindCdio.cmake
+++ b/cmake/modules/FindCdio.cmake
@@ -9,22 +9,24 @@
# CDIO_INCLUDE_DIRS - the cdio include directory
# CDIO_LIBRARIES - the cdio libraries
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_CDIO libcdio>=0.80 QUIET)
pkg_check_modules(PC_CDIOPP libcdio++>=2.1.0 QUIET)
endif()
find_path(CDIO_INCLUDE_DIR NAMES cdio/cdio.h
- PATHS ${PC_CDIO_INCLUDEDIR})
+ HINTS ${PC_CDIO_INCLUDEDIR})
find_library(CDIO_LIBRARY NAMES cdio libcdio
- PATHS ${PC_CDIO_LIBDIR})
+ HINTS ${PC_CDIO_LIBDIR})
if(DEFINED PC_CDIO_VERSION AND DEFINED PC_CDIOPP_VERSION AND NOT "${PC_CDIO_VERSION}" VERSION_EQUAL "${PC_CDIOPP_VERSION}")
message(WARNING "Detected libcdio (${PC_CDIO_VERSION}) and libcdio++ (${PC_CDIOPP_VERSION}) version mismatch. libcdio++ will not be used.")
else()
find_path(CDIOPP_INCLUDE_DIR NAMES cdio++/cdio.hpp
- PATHS ${PC_CDIOPP_INCLUDEDIR} ${CDIO_INCLUDE_DIR})
+ HINTS ${PC_CDIOPP_INCLUDEDIR} ${CDIO_INCLUDE_DIR})
set(CDIO_VERSION ${PC_CDIO_VERSION})
endif()
diff --git a/cmake/modules/FindCurl.cmake b/cmake/modules/FindCurl.cmake
index 6411a92915..fba339bc9d 100644
--- a/cmake/modules/FindCurl.cmake
+++ b/cmake/modules/FindCurl.cmake
@@ -14,14 +14,16 @@
#
# Curl::Curl - The Curl library
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_CURL libcurl QUIET)
endif()
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h
- PATHS ${PC_CURL_INCLUDEDIR})
+ HINTS ${PC_CURL_INCLUDEDIR})
find_library(CURL_LIBRARY NAMES curl libcurl libcurl_imp
- PATHS ${PC_CURL_LIBDIR})
+ HINTS ${PC_CURL_LIBDIR})
set(CURL_VERSION ${PC_CURL_VERSION})
@@ -35,7 +37,7 @@ if(${CURL_LIBRARY} MATCHES ".+\.a$" AND PC_CURL_STATIC_LDFLAGS)
pkg_check_modules(PC_NGHTTP2 libnghttp2 QUIET)
find_library(NGHTTP2_LIBRARY NAMES libnghttp2 nghttp2
- PATHS ${PC_NGHTTP2_LIBDIR})
+ HINTS ${PC_NGHTTP2_LIBDIR})
endif()
include(FindPackageHandleStandardArgs)
diff --git a/cmake/modules/FindEpollShim.cmake b/cmake/modules/FindEpollShim.cmake
index 61366d8907..a4c705f9f2 100644
--- a/cmake/modules/FindEpollShim.cmake
+++ b/cmake/modules/FindEpollShim.cmake
@@ -8,12 +8,16 @@
# EPOLLSHIM_INCLUDE_DIR - the epoll-shim include directory
# EPOLLSHIM_LIBRARY - the epoll-shim library
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_EPOLLSHIM epoll-shim QUIET)
endif()
-find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h PATHS ${PC_EPOLLSHIM_INCLUDE_DIRS})
-find_library(EPOLLSHIM_LIBRARY NAMES epoll-shim PATHS ${PC_EPOLLSHIM_LIBDIR})
+find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h
+ HINTS ${PC_EPOLLSHIM_INCLUDE_DIRS})
+find_library(EPOLLSHIM_LIBRARY NAMES epoll-shim
+ HINTS ${PC_EPOLLSHIM_LIBDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EpollShim
diff --git a/cmake/modules/FindFriBidi.cmake b/cmake/modules/FindFriBidi.cmake
index 65e543af2a..310152f846 100644
--- a/cmake/modules/FindFriBidi.cmake
+++ b/cmake/modules/FindFriBidi.cmake
@@ -13,15 +13,17 @@
#
# FriBidi::FriBidi - The FriBidi library
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_FRIBIDI fribidi QUIET)
endif()
find_path(FRIBIDI_INCLUDE_DIR NAMES fribidi.h
PATH_SUFFIXES fribidi
- PATHS ${PC_FRIBIDI_INCLUDEDIR})
+ HINTS ${PC_FRIBIDI_INCLUDEDIR})
find_library(FRIBIDI_LIBRARY NAMES fribidi libfribidi
- PATHS ${PC_FRIBIDI_LIBDIR})
+ HINTS ${PC_FRIBIDI_LIBDIR})
set(FRIBIDI_VERSION ${PC_FRIBIDI_VERSION})
diff --git a/cmake/modules/FindGLU.cmake b/cmake/modules/FindGLU.cmake
index f91d33deb6..5d232970e0 100644
--- a/cmake/modules/FindGLU.cmake
+++ b/cmake/modules/FindGLU.cmake
@@ -11,14 +11,16 @@
# GLU_DEFINITIONS - the GLU definitions
#
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_GLU glu QUIET)
endif()
find_path(GLU_INCLUDE_DIR NAMES GL/glu.h
- PATHS ${PC_GLU_INCLUDEDIR})
+ HINTS ${PC_GLU_INCLUDEDIR})
find_library(GLU_LIBRARY NAMES GLU
- PATHS ${PC_GLU_LIBDIR})
+ HINTS ${PC_GLU_LIBDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLU
diff --git a/cmake/modules/FindGLX.cmake b/cmake/modules/FindGLX.cmake
index 56555d4c44..25c650e704 100644
--- a/cmake/modules/FindGLX.cmake
+++ b/cmake/modules/FindGLX.cmake
@@ -14,14 +14,16 @@
#
# GLX::GLX - The GLX library
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_GLX glx QUIET)
endif()
find_path(GLX_INCLUDE_DIR NAMES GL/glx.h
- PATHS ${PC_GLX_INCLUDEDIR})
+ HINTS ${PC_GLX_INCLUDEDIR})
find_library(GLX_LIBRARY NAMES GL
- PATHS ${PC_GLX_LIBDIR})
+ HINTS ${PC_GLX_LIBDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLX
diff --git a/cmake/modules/FindGnuTLS.cmake b/cmake/modules/FindGnuTLS.cmake
index 41226bf26a..b323e9e277 100644
--- a/cmake/modules/FindGnuTLS.cmake
+++ b/cmake/modules/FindGnuTLS.cmake
@@ -5,11 +5,7 @@
# GNUTLS_INCLUDE_DIRS - the gnutls include directory
# GNUTLS_LIBRARIES - The gnutls libraries
-# Suppress PkgConfig Mismatch warning, see https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html
-set(FPHSA_NAME_MISMATCHED 1)
-include(FindPkgConfig)
-find_package(PkgConfig QUIET)
-unset(FPHSA_NAME_MISMATCHED)
+find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(GNUTLS gnutls QUIET)
diff --git a/cmake/modules/FindIso9660pp.cmake b/cmake/modules/FindIso9660pp.cmake
index f98273b870..b6fbdc83e4 100644
--- a/cmake/modules/FindIso9660pp.cmake
+++ b/cmake/modules/FindIso9660pp.cmake
@@ -10,24 +10,33 @@
# ISO9660PP_LIBRARIES - the iso9660++ libraries
# ISO9660PP_DEFINITIONS - the iso9660++ definitions
+if(Iso9660pp_FIND_VERSION)
+ if(Iso9660pp_FIND_VERSION_EXACT)
+ set(Iso9660pp_FIND_SPEC "=${Iso9660pp_FIND_VERSION_COMPLETE}")
+ else()
+ set(Iso9660pp_FIND_SPEC ">=${Iso9660pp_FIND_VERSION_COMPLETE}")
+ endif()
+endif()
+
+find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_ISO9660PP libiso9660++>=2.1.0 QUIET)
- pkg_check_modules(PC_ISO9660 libiso9660>=2.1.0 QUIET)
+ pkg_check_modules(PC_ISO9660PP libiso9660++${Iso9660pp_FIND_SPEC} QUIET)
+ pkg_check_modules(PC_ISO9660 libiso9660${Iso9660pp_FIND_SPEC} QUIET)
endif()
find_package(Cdio)
find_path(ISO9660PP_INCLUDE_DIR NAMES cdio++/iso9660.hpp
- PATHS ${PC_ISO9660PP_INCLUDEDIR})
+ HINTS ${PC_ISO9660PP_INCLUDEDIR})
find_library(ISO9660PP_LIBRARY NAMES libiso9660++ iso9660++
- PATHS ${PC_ISO9660PP_LIBDIR})
+ HINTS ${PC_ISO9660PP_LIBDIR})
find_path(ISO9660_INCLUDE_DIR NAMES cdio/iso9660.h
- PATHS ${PC_ISO9660_INCLUDEDIR})
+ HINTS ${PC_ISO9660_INCLUDEDIR})
find_library(ISO9660_LIBRARY NAMES libiso9660 iso9660
- PATHS ${PC_ISO9660_LIBDIR})
+ HINTS ${PC_ISO9660_LIBDIR})
set(ISO9660PP_VERSION ${PC_ISO9660PP_VERSION})
diff --git a/cmake/modules/FindKissFFT.cmake b/cmake/modules/FindKissFFT.cmake
index 08a7020f28..41fc34254f 100644
--- a/cmake/modules/FindKissFFT.cmake
+++ b/cmake/modules/FindKissFFT.cmake
@@ -22,9 +22,9 @@ else()
endif()
find_path(KISSFFT_INCLUDE_DIR kissfft/kiss_fft.h kissfft/kiss_fftr.h
- PATHS ${PC_KISSFFT_INCLUDEDIR})
+ HINTS ${PC_KISSFFT_INCLUDEDIR})
find_library(KISSFFT_LIBRARY NAMES kissfft-float kissfft-int32 kissfft-int16 kissfft-simd
- PATHS ${PC_KISSFFT_LIBDIR})
+ HINTS ${PC_KISSFFT_LIBDIR})
# Check if all REQUIRED_VARS are satisfied and set KISSFFT_FOUND
include(FindPackageHandleStandardArgs)
diff --git a/cmake/modules/FindLCMS2.cmake b/cmake/modules/FindLCMS2.cmake
index 73075d8997..e0501d2624 100644
--- a/cmake/modules/FindLCMS2.cmake
+++ b/cmake/modules/FindLCMS2.cmake
@@ -8,9 +8,18 @@
# LCMS2::LCMS2 - The LCMS Color Management library
if(NOT TARGET LCMS2::LCMS2)
+
+ if(LCMS2_FIND_VERSION)
+ if(LCMS2_FIND_VERSION_EXACT)
+ set(LCMS2_FIND_SPEC "=${LCMS2_FIND_VERSION_COMPLETE}")
+ else()
+ set(LCMS2_FIND_SPEC ">=${LCMS2_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_LCMS2 lcms2>=2.10 QUIET)
+ pkg_check_modules(PC_LCMS2 lcms2${LCMS2_FIND_SPEC} QUIET)
endif()
find_path(LCMS2_INCLUDE_DIR NAMES lcms2.h
diff --git a/cmake/modules/FindLibAndroidJNI.cmake b/cmake/modules/FindLibAndroidJNI.cmake
index 8d240b7e2a..05d6a5734d 100644
--- a/cmake/modules/FindLibAndroidJNI.cmake
+++ b/cmake/modules/FindLibAndroidJNI.cmake
@@ -35,6 +35,4 @@ if(NOT TARGET libandroidjni::libandroidjni)
add_dependencies(libandroidjni::libandroidjni libandroidjni)
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP libandroidjni::libandroidjni)
-
- mark_as_advanced(LIBANDROIDJNI_INCLUDE_DIR LIBANDROIDJNI_LIBRARY)
endif()
diff --git a/cmake/modules/FindLibDRM.cmake b/cmake/modules/FindLibDRM.cmake
index efb7003c97..8fbd7f4354 100644
--- a/cmake/modules/FindLibDRM.cmake
+++ b/cmake/modules/FindLibDRM.cmake
@@ -8,17 +8,26 @@
# LibDRM::LibDRM - The LibDRM library
if(NOT TARGET LIBDRM::LIBDRM)
+
+ if(LibDRM_FIND_VERSION)
+ if(LibDRM_FIND_VERSION_EXACT)
+ set(LibDRM_FIND_SPEC "=${LibDRM_FIND_VERSION_COMPLETE}")
+ else()
+ set(LibDRM_FIND_SPEC ">=${LibDRM_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_LIBDRM libdrm>=2.4.95 QUIET)
+ pkg_check_modules(PC_LIBDRM libdrm${LibDRM_FIND_SPEC} QUIET)
endif()
find_path(LIBDRM_INCLUDE_DIR NAMES drm.h
PATH_SUFFIXES libdrm drm
- PATHS ${PC_LIBDRM_INCLUDEDIR}
+ HINTS ${PC_LIBDRM_INCLUDEDIR}
NO_CACHE)
find_library(LIBDRM_LIBRARY NAMES drm
- PATHS ${PC_LIBDRM_LIBDIR}
+ HINTS ${PC_LIBDRM_LIBDIR}
NO_CACHE)
set(LIBDRM_VERSION ${PC_LIBDRM_VERSION})
diff --git a/cmake/modules/FindLibDisplayInfo.cmake b/cmake/modules/FindLibDisplayInfo.cmake
index add628d8c7..b74e66e948 100644
--- a/cmake/modules/FindLibDisplayInfo.cmake
+++ b/cmake/modules/FindLibDisplayInfo.cmake
@@ -11,15 +11,17 @@
# LIBDISPLAYINFO_DEFINITIONS - the LIBDISPLAY-INFO definitions
#
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBDISPLAYINFO libdisplay-info QUIET)
endif()
find_path(LIBDISPLAYINFO_INCLUDE_DIR libdisplay-info/edid.h
- PATHS ${PC_LIBDISPLAYINFO_INCLUDEDIR})
+ HINTS ${PC_LIBDISPLAYINFO_INCLUDEDIR})
find_library(LIBDISPLAYINFO_LIBRARY NAMES display-info
- PATHS ${PC_LIBDISPLAYINFO_LIBDIR})
+ HINTS ${PC_LIBDISPLAYINFO_LIBDIR})
set(LIBDISPLAYINFO_VERSION ${PC_LIBDISPLAYINFO_VERSION})
diff --git a/cmake/modules/FindLibDovi.cmake b/cmake/modules/FindLibDovi.cmake
index 8646ba368a..2f9f29632e 100644
--- a/cmake/modules/FindLibDovi.cmake
+++ b/cmake/modules/FindLibDovi.cmake
@@ -9,15 +9,17 @@
# LIBDOVI_LIBRARIES - the libdovi libraries
# LIBDOVI_DEFINITIONS - the libdovi compile definitions
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBDOVI libdovi QUIET)
endif()
find_library(LIBDOVI_LIBRARY NAMES dovi libdovi
- PATHS ${PC_LIBDOVI_LIBDIR}
+ HINTS ${PC_LIBDOVI_LIBDIR}
)
find_path(LIBDOVI_INCLUDE_DIR NAMES libdovi/rpu_parser.h
- PATHS ${PC_LIBDOVI_INCLUDEDIR})
+ HINTS ${PC_LIBDOVI_INCLUDEDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibDovi
diff --git a/cmake/modules/FindLibInput.cmake b/cmake/modules/FindLibInput.cmake
index 069df5f780..a1530f3a25 100644
--- a/cmake/modules/FindLibInput.cmake
+++ b/cmake/modules/FindLibInput.cmake
@@ -11,15 +11,17 @@
# LIBINPUT_DEFINITIONS - the libinput compile definitions
#
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBINPUT libinput QUIET)
endif()
find_path(LIBINPUT_INCLUDE_DIR NAMES libinput.h
- PATHS ${PC_LIBINPUT_INCLUDEDIR})
+ HINTS ${PC_LIBINPUT_INCLUDEDIR})
find_library(LIBINPUT_LIBRARY NAMES input
- PATHS ${PC_LIBINPUT_LIBDIR})
+ HINTS ${PC_LIBINPUT_LIBDIR})
set(LIBINPUT_VERSION ${PC_LIBINPUT_VERSION})
diff --git a/cmake/modules/FindLibUSB.cmake b/cmake/modules/FindLibUSB.cmake
index 4efc670d46..2610ffbafe 100644
--- a/cmake/modules/FindLibUSB.cmake
+++ b/cmake/modules/FindLibUSB.cmake
@@ -15,10 +15,10 @@ if(NOT TARGET LibUSB::LibUSB)
endif()
find_path(LIBUSB_INCLUDE_DIR usb.h
- PATHS ${PC_LIBUSB_INCLUDEDIR}
+ HINTS ${PC_LIBUSB_INCLUDEDIR}
NO_CACHE)
find_library(LIBUSB_LIBRARY NAMES usb
- PATHS ${PC_LIBUSB_INCLUDEDIR}
+ HINTS ${PC_LIBUSB_INCLUDEDIR}
NO_CACHE)
set(LIBUSB_VERSION ${PC_LIBUSB_VERSION})
diff --git a/cmake/modules/FindLircClient.cmake b/cmake/modules/FindLircClient.cmake
index 947acd8d78..888cbd6280 100644
--- a/cmake/modules/FindLircClient.cmake
+++ b/cmake/modules/FindLircClient.cmake
@@ -12,8 +12,10 @@ if(NOT TARGET LIRCCLIENT::LIRCCLIENT)
pkg_check_modules(PC_LIRC lirc QUIET)
endif()
- find_path(LIRCCLIENT_INCLUDE_DIR lirc/lirc_client.h PATHS ${PC_LIRC_INCLUDEDIR})
- find_library(LIRCCLIENT_LIBRARY lirc_client PATHS ${PC_LIRC_LIBDIR})
+ find_path(LIRCCLIENT_INCLUDE_DIR lirc/lirc_client.h
+ HINTS ${PC_LIRC_INCLUDEDIR})
+ find_library(LIRCCLIENT_LIBRARY lirc_client
+ HINTS ${PC_LIRC_LIBDIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LircClient
diff --git a/cmake/modules/FindMariaDBClient.cmake b/cmake/modules/FindMariaDBClient.cmake
index a34ac65aa3..efbe395500 100644
--- a/cmake/modules/FindMariaDBClient.cmake
+++ b/cmake/modules/FindMariaDBClient.cmake
@@ -11,8 +11,6 @@ if(NOT TARGET MariaDBClient::MariaDBClient)
# Don't find system wide installed version on Windows
if(WIN32)
set(EXTRA_FIND_ARGS NO_SYSTEM_ENVIRONMENT_PATH)
- else()
- set(EXTRA_FIND_ARGS)
endif()
find_package(PkgConfig)
@@ -22,15 +20,15 @@ if(NOT TARGET MariaDBClient::MariaDBClient)
endif()
find_path(MARIADBCLIENT_INCLUDE_DIR NAMES mariadb/mysql.h mariadb/server/mysql.h
- PATHS ${PC_MARIADBCLIENT_INCLUDEDIR}
+ HINTS ${PC_MARIADBCLIENT_INCLUDEDIR}
NO_CACHE)
find_library(MARIADBCLIENT_LIBRARY_RELEASE NAMES mariadbclient mariadb libmariadb
- PATHS ${PC_MARIADBCLIENT_LIBDIR}
+ HINTS ${PC_MARIADBCLIENT_LIBDIR}
PATH_SUFFIXES mariadb
${EXTRA_FIND_ARGS}
NO_CACHE)
find_library(MARIADBCLIENT_LIBRARY_DEBUG NAMES mariadbclient mariadb libmariadbd
- PATHS ${PC_MARIADBCLIENT_LIBDIR}
+ HINTS ${PC_MARIADBCLIENT_LIBDIR}
PATH_SUFFIXES mariadb
${EXTRA_FIND_ARGS}
NO_CACHE)
diff --git a/cmake/modules/FindMicroHttpd.cmake b/cmake/modules/FindMicroHttpd.cmake
index a0b91a0085..02c94637d6 100644
--- a/cmake/modules/FindMicroHttpd.cmake
+++ b/cmake/modules/FindMicroHttpd.cmake
@@ -10,18 +10,25 @@
# MICROHTTPD_LIBRARIES - the MicroHttpd libraries
# MICROHTTPD_DEFINITIONS - the MicroHttpd definitions
#
-# and the following imported targets::
-#
-# MicroHttpd::MicroHttpd - The MicroHttpd library
+
+if(MicroHttpd_FIND_VERSION)
+ if(MicroHttpd_FIND_VERSION_EXACT)
+ set(MicroHttpd_FIND_SPEC "=${MicroHttpd_FIND_VERSION_COMPLETE}")
+ else()
+ set(MicroHttpd_FIND_SPEC ">=${MicroHttpd_FIND_VERSION_COMPLETE}")
+ endif()
+endif()
+
+find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_MICROHTTPD libmicrohttpd>=0.9.40 QUIET)
+ pkg_check_modules(PC_MICROHTTPD libmicrohttpd${MicroHttpd_FIND_SPEC} QUIET)
endif()
find_path(MICROHTTPD_INCLUDE_DIR NAMES microhttpd.h
- PATHS ${PC_MICROHTTPD_INCLUDEDIR})
+ HINTS ${PC_MICROHTTPD_INCLUDEDIR})
find_library(MICROHTTPD_LIBRARY NAMES microhttpd libmicrohttpd
- PATHS ${PC_MICROHTTPD_LIBDIR})
+ HINTS ${PC_MICROHTTPD_LIBDIR})
set(MICROHTTPD_VERSION ${PC_MICROHTTPD_VERSION})
diff --git a/cmake/modules/FindMySqlClient.cmake b/cmake/modules/FindMySqlClient.cmake
index 04530912f8..aed95776f6 100644
--- a/cmake/modules/FindMySqlClient.cmake
+++ b/cmake/modules/FindMySqlClient.cmake
@@ -11,8 +11,6 @@ if(NOT TARGET MySqlClient::MySqlClient)
# Don't find system wide installed version on Windows
if(WIN32)
set(EXTRA_FIND_ARGS NO_SYSTEM_ENVIRONMENT_PATH)
- else()
- set(EXTRA_FIND_ARGS)
endif()
find_path(MYSQLCLIENT_INCLUDE_DIR NAMES mysql/mysql.h mysql/server/mysql.h
diff --git a/cmake/modules/FindNFS.cmake b/cmake/modules/FindNFS.cmake
index f1528a188b..9da2a3ca56 100644
--- a/cmake/modules/FindNFS.cmake
+++ b/cmake/modules/FindNFS.cmake
@@ -41,9 +41,19 @@ if(NOT TARGET libnfs::nfs)
buildlibnfs()
else()
if(NOT TARGET libnfs::nfs)
+
+ if(NFS_FIND_VERSION)
+ if(NFS_FIND_VERSION_EXACT)
+ set(NFS_FIND_SPEC "=${NFS_FIND_VERSION_COMPLETE}")
+ else()
+ set(NFS_FIND_SPEC ">=${NFS_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
+ find_package(PkgConfig)
# Try pkgconfig based search as last resort
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_LIBNFS libnfs>=3.0.0 QUIET)
+ pkg_check_modules(PC_LIBNFS libnfs${NFS_FIND_SPEC} QUIET)
endif()
find_library(LIBNFS_LIBRARY_RELEASE NAMES nfs libnfs
diff --git a/cmake/modules/FindPCRE.cmake b/cmake/modules/FindPCRE.cmake
index 811aa3fcb2..578c4b8923 100644
--- a/cmake/modules/FindPCRE.cmake
+++ b/cmake/modules/FindPCRE.cmake
@@ -72,6 +72,7 @@ if(NOT PCRE::pcre)
else()
if(NOT TARGET PCRE::pcre)
+ find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_PCRE pcre QUIET)
endif()
diff --git a/cmake/modules/FindPipewire.cmake b/cmake/modules/FindPipewire.cmake
index 6372fd8182..653a891eec 100644
--- a/cmake/modules/FindPipewire.cmake
+++ b/cmake/modules/FindPipewire.cmake
@@ -11,21 +11,30 @@
# PIPEWIRE_DEFINITIONS - the definitions needed to use Pipewire
#
+if(Pipewire_FIND_VERSION)
+ if(Pipewire_FIND_VERSION_EXACT)
+ set(Pipewire_FIND_SPEC "=${Pipewire_FIND_VERSION_COMPLETE}")
+ else()
+ set(Pipewire_FIND_SPEC ">=${Pipewire_FIND_VERSION_COMPLETE}")
+ endif()
+endif()
+
+find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_PIPEWIRE libpipewire-0.3>=0.3.50 QUIET)
+ pkg_check_modules(PC_PIPEWIRE libpipewire-0.3${Pipewire_FIND_SPEC} QUIET)
pkg_check_modules(PC_SPA libspa-0.2>=0.2 QUIET)
endif()
find_path(PIPEWIRE_INCLUDE_DIR NAMES pipewire/pipewire.h
- PATHS ${PC_PIPEWIRE_INCLUDEDIR}
+ HINTS ${PC_PIPEWIRE_INCLUDEDIR}
PATH_SUFFIXES pipewire-0.3)
find_path(SPA_INCLUDE_DIR NAMES spa/support/plugin.h
- PATHS ${PC_SPA_INCLUDEDIR}
+ HINTS ${PC_SPA_INCLUDEDIR}
PATH_SUFFIXES spa-0.2)
find_library(PIPEWIRE_LIBRARY NAMES pipewire-0.3
- PATHS ${PC_PIPEWIRE_LIBDIR})
+ HITNS ${PC_PIPEWIRE_LIBDIR})
if(PC_PIPEWIRE_VERSION)
set(PIPEWIRE_VERSION_STRING ${PC_PIPEWIRE_VERSION})
diff --git a/cmake/modules/FindPlayerAPIs.cmake b/cmake/modules/FindPlayerAPIs.cmake
index 1a4913b490..00b497ffcf 100644
--- a/cmake/modules/FindPlayerAPIs.cmake
+++ b/cmake/modules/FindPlayerAPIs.cmake
@@ -8,16 +8,25 @@
# PLAYERAPIS::PLAYERAPIS - The playerAPIs library
if(NOT TARGET PLAYERAPIS::PLAYERAPIS)
+
+ if(PlayerAPIs_FIND_VERSION)
+ if(PlayerAPIs_FIND_VERSION_EXACT)
+ set(PlayerAPIs_FIND_SPEC "=${PlayerAPIs_FIND_VERSION_COMPLETE}")
+ else()
+ set(PlayerAPIs_FIND_SPEC ">=${PlayerAPIs_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_PLAYERAPIS libplayerAPIs>=1.0.0 QUIET)
+ pkg_check_modules(PC_PLAYERAPIS libplayerAPIs${PlayerAPIs_FIND_SPEC} QUIET)
endif()
find_path(PLAYERAPIS_INCLUDE_DIR NAMES starfish-media-pipeline/StarfishMediaAPIs.h
- PATHS ${PC_PLAYERAPIS_INCLUDEDIR}
+ HINTS ${PC_PLAYERAPIS_INCLUDEDIR}
NO_CACHE)
find_library(PLAYERAPIS_LIBRARY NAMES playerAPIs
- PATHS ${PC_PLAYERAPIS_LIBDIR}
+ HINTS ${PC_PLAYERAPIS_LIBDIR}
NO_CACHE)
set(PLAYERAPIS_VERSION ${PC_PLAYERAPIS_VERSION})
diff --git a/cmake/modules/FindPlayerFactory.cmake b/cmake/modules/FindPlayerFactory.cmake
index 1665d6c58b..40944e5730 100644
--- a/cmake/modules/FindPlayerFactory.cmake
+++ b/cmake/modules/FindPlayerFactory.cmake
@@ -8,16 +8,25 @@
# PLAYERFACTORY::PLAYERFACTORY - The PlayerFactory library
if(NOT TARGET PLAYERFACTORY::PLAYERFACTORY)
+
+ if(PlayerFactory_FIND_VERSION)
+ if(PlayerFactory_FIND_VERSION_EXACT)
+ set(PlayerFactory_FIND_SPEC "=${PlayerFactory_FIND_VERSION_COMPLETE}")
+ else()
+ set(PlayerFactory_FIND_SPEC ">=${PlayerFactory_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_PLAYERFACTORY libpf-1.0>=1.0.0 QUIET)
+ pkg_check_modules(PC_PLAYERFACTORY libpf-1.0${PlayerFactory_FIND_SPEC} QUIET)
endif()
find_path(PLAYERFACTORY_INCLUDE_DIR NAMES player-factory/common.hpp
- PATHS ${PC_PLAYERFACTORY_INCLUDEDIR}
+ HINTS ${PC_PLAYERFACTORY_INCLUDEDIR}
NO_CACHE)
find_library(PLAYERFACTORY_LIBRARY NAMES pf-1.0
- PATHS ${PC_PLAYERFACTORY_LIBDIR}
+ HINTS ${PC_PLAYERFACTORY_LIBDIR}
NO_CACHE)
set(PLAYERFACTORY_VERSION ${PC_PLAYERFACTORY_VERSION})
diff --git a/cmake/modules/FindPlist.cmake b/cmake/modules/FindPlist.cmake
index 368b6758d5..194ee305e7 100644
--- a/cmake/modules/FindPlist.cmake
+++ b/cmake/modules/FindPlist.cmake
@@ -14,13 +14,13 @@ if(NOT TARGET Plist::Plist)
endif()
find_path(PLIST_INCLUDE_DIR plist/plist.h
- PATHS ${PC_PLIST_INCLUDEDIR}
+ HINTS ${PC_PLIST_INCLUDEDIR}
NO_CACHE)
set(PLIST_VERSION ${PC_PLIST_VERSION})
find_library(PLIST_LIBRARY NAMES plist-2.0 plist libplist-2.0 libplist
- PATHS ${PC_PLIST_LIBDIR}
+ HINTS ${PC_PLIST_LIBDIR}
NO_CACHE)
include(FindPackageHandleStandardArgs)
diff --git a/cmake/modules/FindPulseAudio.cmake b/cmake/modules/FindPulseAudio.cmake
index 8a96588f39..4d480ba6e5 100644
--- a/cmake/modules/FindPulseAudio.cmake
+++ b/cmake/modules/FindPulseAudio.cmake
@@ -10,11 +10,20 @@
# PulseAudio::PulseAudioMainloop - The PulseAudio mainloop library
if(NOT TARGET PulseAudio::PulseAudio)
+
+ if(PulseAudio_FIND_VERSION)
+ if(PulseAudio_FIND_VERSION_EXACT)
+ set(PulseAudio_FIND_SPEC "=${PulseAudio_FIND_VERSION_COMPLETE}")
+ else()
+ set(PulseAudio_FIND_SPEC ">=${PulseAudio_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_PULSEAUDIO libpulse>=11.0.0 QUIET)
- pkg_check_modules(PC_PULSEAUDIO_MAINLOOP libpulse-mainloop-glib>=11.0.0 QUIET)
- pkg_check_modules(PC_PULSEAUDIO_SIMPLE libpulse-simple>=11.0.0 QUIET)
+ pkg_check_modules(PC_PULSEAUDIO libpulse${PulseAudio_FIND_SPEC} QUIET)
+ pkg_check_modules(PC_PULSEAUDIO_MAINLOOP libpulse-mainloop-glib${PulseAudio_FIND_SPEC} QUIET)
+ pkg_check_modules(PC_PULSEAUDIO_SIMPLE libpulse-simple${PulseAudio_FIND_SPEC} QUIET)
endif()
find_path(PULSEAUDIO_INCLUDE_DIR NAMES pulse/pulseaudio.h pulse/simple.h
diff --git a/cmake/modules/FindSmbClient.cmake b/cmake/modules/FindSmbClient.cmake
index 46ca64a9d1..1cb265036a 100644
--- a/cmake/modules/FindSmbClient.cmake
+++ b/cmake/modules/FindSmbClient.cmake
@@ -14,14 +14,16 @@
#
# SmbClient::SmbClient - The SmbClient library
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_SMBCLIENT smbclient QUIET)
endif()
find_path(SMBCLIENT_INCLUDE_DIR NAMES libsmbclient.h
- PATHS ${PC_SMBCLIENT_INCLUDEDIR})
+ HINTS ${PC_SMBCLIENT_INCLUDEDIR})
find_library(SMBCLIENT_LIBRARY NAMES smbclient
- PATHS ${PC_SMBCLIENT_LIBDIR})
+ HINTS ${PC_SMBCLIENT_LIBDIR})
set(SMBCLIENT_VERSION ${PC_SMBCLIENT_VERSION})
diff --git a/cmake/modules/FindSqlite3.cmake b/cmake/modules/FindSqlite3.cmake
index f1e50e44a7..6fb2bfe2d7 100644
--- a/cmake/modules/FindSqlite3.cmake
+++ b/cmake/modules/FindSqlite3.cmake
@@ -15,10 +15,10 @@ if(NOT TARGET SQLite3::SQLite3)
endif()
find_path(SQLITE3_INCLUDE_DIR NAMES sqlite3.h
- PATHS ${PC_SQLITE3_INCLUDEDIR}
+ HINTS ${PC_SQLITE3_INCLUDEDIR}
NO_CACHE)
find_library(SQLITE3_LIBRARY NAMES sqlite3
- PATHS ${PC_SQLITE3_LIBDIR}
+ HINTS ${PC_SQLITE3_LIBDIR}
NO_CACHE)
set(SQLITE3_VERSION ${PC_SQLITE3_VERSION})
diff --git a/cmake/modules/FindTinyXML.cmake b/cmake/modules/FindTinyXML.cmake
index 5e9539e2d6..c0daa9978e 100644
--- a/cmake/modules/FindTinyXML.cmake
+++ b/cmake/modules/FindTinyXML.cmake
@@ -14,19 +14,21 @@
#
# TinyXML::TinyXML - The TinyXML library
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_TINYXML tinyxml QUIET)
endif()
find_path(TINYXML_INCLUDE_DIR tinyxml.h
PATH_SUFFIXES tinyxml
- PATHS ${PC_TINYXML_INCLUDEDIR})
+ HINTS ${PC_TINYXML_INCLUDEDIR})
find_library(TINYXML_LIBRARY_RELEASE NAMES tinyxml tinyxmlSTL
PATH_SUFFIXES tinyxml
- PATHS ${PC_TINYXML_LIBDIR})
+ HINTS ${PC_TINYXML_LIBDIR})
find_library(TINYXML_LIBRARY_DEBUG NAMES tinyxmld tinyxmlSTLd
PATH_SUFFIXES tinyxml
- PATHS ${PC_TINYXML_LIBDIR})
+ HINTS ${PC_TINYXML_LIBDIR})
set(TINYXML_VERSION ${PC_TINYXML_VERSION})
include(SelectLibraryConfigurations)
diff --git a/cmake/modules/FindUDEV.cmake b/cmake/modules/FindUDEV.cmake
index 2a88c496b7..8187e0206d 100644
--- a/cmake/modules/FindUDEV.cmake
+++ b/cmake/modules/FindUDEV.cmake
@@ -14,10 +14,10 @@ if(NOT TARGET UDEV::UDEV)
endif()
find_path(UDEV_INCLUDE_DIR NAMES libudev.h
- PATHS ${PC_UDEV_INCLUDEDIR}
+ HINTS ${PC_UDEV_INCLUDEDIR}
NO_CACHE)
find_library(UDEV_LIBRARY NAMES udev
- PATHS ${PC_UDEV_LIBDIR}
+ HINTS ${PC_UDEV_LIBDIR}
NO_CACHE)
set(UDEV_VERSION ${PC_UDEV_VERSION})
diff --git a/cmake/modules/FindUUID.cmake b/cmake/modules/FindUUID.cmake
index 49fc5b28ce..2a0aaf11f8 100644
--- a/cmake/modules/FindUUID.cmake
+++ b/cmake/modules/FindUUID.cmake
@@ -9,14 +9,15 @@
#
if(NOT TARGET UUID::UUID)
+ find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_UUID uuid QUIET)
endif()
find_path(UUID_INCLUDE_DIR uuid/uuid.h
- PATHS ${PC_UUID_INCLUDEDIR})
+ HINTS ${PC_UUID_INCLUDEDIR})
find_library(UUID_LIBRARY uuid
- PATHS ${PC_UUID_LIBRARY})
+ HINTS ${PC_UUID_LIBRARY})
set(UUID_VERSION ${PC_UUID_VERSION})
include(FindPackageHandleStandardArgs)
@@ -30,6 +31,4 @@ if(NOT TARGET UUID::UUID)
IMPORTED_LOCATION "${UUID_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${UUID_INCLUDE_DIR}")
endif()
-
- mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY)
endif()
diff --git a/cmake/modules/FindVAAPI.cmake b/cmake/modules/FindVAAPI.cmake
index f0a5d0599f..90c4bf6e5c 100644
--- a/cmake/modules/FindVAAPI.cmake
+++ b/cmake/modules/FindVAAPI.cmake
@@ -10,6 +10,8 @@
# VAAPI_LIBRARIES - the VAAPI libraries
# VAAPI_DEFINITIONS - the VAAPI definitions
+find_package(PkgConfig)
+
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_VAAPI libva libva-drm libva-wayland libva-x11 QUIET)
endif()
@@ -17,25 +19,25 @@ endif()
set(REQUIRED_VARS "VAAPI_libva_LIBRARY" "VAAPI_libva-drm_LIBRARY" "VAAPI_libva_INCLUDE_DIR" "VAAPI_libva-drm_INCLUDE_DIR")
find_path(VAAPI_libva_INCLUDE_DIR va/va.h
- PATHS ${PC_VAAPI_libva_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva_INCLUDEDIR})
find_library(VAAPI_libva_LIBRARY NAMES va
- PATHS ${PC_VAAPI_libva_LIBDIR})
+ HINTS ${PC_VAAPI_libva_LIBDIR})
find_path(VAAPI_libva-drm_INCLUDE_DIR va/va_drm.h
- PATHS ${PC_VAAPI_libva-drm_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva-drm_INCLUDEDIR})
find_library(VAAPI_libva-drm_LIBRARY NAMES va-drm
- PATHS ${PC_VAAPI_libva-drm_LIBDIR})
+ HINTS ${PC_VAAPI_libva-drm_LIBDIR})
if("wayland" IN_LIST CORE_PLATFORM_NAME_LC)
find_path(VAAPI_libva-wayland_INCLUDE_DIR va/va_wayland.h
- PATHS ${PC_VAAPI_libva-wayland_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva-wayland_INCLUDEDIR})
find_library(VAAPI_libva-wayland_LIBRARY NAMES va-wayland
- PATHS ${PC_VAAPI_libva-wayland_LIBDIR})
+ HINTS ${PC_VAAPI_libva-wayland_LIBDIR})
list(APPEND REQUIRED_VARS "VAAPI_libva-wayland_INCLUDE_DIR" "VAAPI_libva-wayland_LIBRARY")
endif()
if("x11" IN_LIST CORE_PLATFORM_NAME_LC)
find_path(VAAPI_libva-x11_INCLUDE_DIR va/va_x11.h
- PATHS ${PC_VAAPI_libva-x11_INCLUDEDIR})
+ HINTS ${PC_VAAPI_libva-x11_INCLUDEDIR})
find_library(VAAPI_libva-x11_LIBRARY NAMES va-x11
- PATHS ${PC_VAAPI_libva-x11_LIBDIR})
+ HINTS ${PC_VAAPI_libva-x11_LIBDIR})
list(APPEND REQUIRED_VARS "VAAPI_libva-x11_INCLUDE_DIR" "VAAPI_libva-x11_LIBRARY")
endif()
diff --git a/cmake/modules/FindVDPAU.cmake b/cmake/modules/FindVDPAU.cmake
index bd246bdc74..680a43f366 100644
--- a/cmake/modules/FindVDPAU.cmake
+++ b/cmake/modules/FindVDPAU.cmake
@@ -14,10 +14,10 @@ if(NOT TARGET VDPAU::VDPAU)
endif()
find_path(VDPAU_INCLUDE_DIR NAMES vdpau/vdpau.h vdpau/vdpau_x11.h
- PATHS ${PC_VDPAU_INCLUDEDIR}
+ HINTS ${PC_VDPAU_INCLUDEDIR}
NO_CACHE)
find_library(VDPAU_LIBRARY NAMES vdpau
- PATHS ${PC_VDPAU_LIBDIR}
+ HINTS ${PC_VDPAU_LIBDIR}
NO_CACHE)
set(VDPAU_VERSION ${PC_VDPAU_VERSION})
diff --git a/cmake/modules/FindWaylandProtocols.cmake b/cmake/modules/FindWaylandProtocols.cmake
index e74bb80c79..1c9461482b 100644
--- a/cmake/modules/FindWaylandProtocols.cmake
+++ b/cmake/modules/FindWaylandProtocols.cmake
@@ -7,6 +7,7 @@
# WAYLAND_PROTOCOLS_DIR - directory containing the additional Wayland protocols
# from the wayland-protocols package
+find_package(PkgConfig)
pkg_check_modules(PC_WAYLAND_PROTOCOLS wayland-protocols)
if(PC_WAYLAND_PROTOCOLS_FOUND)
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
diff --git a/cmake/modules/FindWaylandProtocolsWebOS.cmake b/cmake/modules/FindWaylandProtocolsWebOS.cmake
index 041ea2bffa..1358ad7737 100644
--- a/cmake/modules/FindWaylandProtocolsWebOS.cmake
+++ b/cmake/modules/FindWaylandProtocolsWebOS.cmake
@@ -9,7 +9,7 @@
find_path(WAYLANDPROTOCOLSWEBOS_PROTOCOLSDIR NAMES webos-shell.xml
PATH_SUFFIXES wayland-webos
- PATHS ${DEPENDS_PATH}/share
+ HINTS ${DEPENDS_PATH}/share
REQUIRED)
include(FindPackageMessage)
diff --git a/cmake/modules/FindWaylandpp.cmake b/cmake/modules/FindWaylandpp.cmake
index 06ed683e8a..7b28892a04 100644
--- a/cmake/modules/FindWaylandpp.cmake
+++ b/cmake/modules/FindWaylandpp.cmake
@@ -10,6 +10,7 @@
# WAYLANDPP_DEFINITIONS - the waylandpp definitions
# WAYLANDPP_SCANNER - path to wayland-scanner++
+find_package(PkgConfig)
pkg_check_modules(PC_WAYLANDPP wayland-client++ wayland-egl++ wayland-cursor++ QUIET)
if(PC_WAYLANDPP_FOUND)
@@ -26,16 +27,16 @@ else()
message(SEND_ERROR "wayland-scanner++ not found via pkg-config")
endif()
-find_path(WAYLANDPP_INCLUDE_DIR wayland-client.hpp PATHS ${PC_WAYLANDPP_INCLUDEDIR})
+find_path(WAYLANDPP_INCLUDE_DIR wayland-client.hpp HINTS ${PC_WAYLANDPP_INCLUDEDIR})
find_library(WAYLANDPP_CLIENT_LIBRARY NAMES wayland-client++
- PATHS ${PC_WAYLANDPP_LIBRARY_DIRS})
+ HINTS ${PC_WAYLANDPP_LIBRARY_DIRS})
find_library(WAYLANDPP_CURSOR_LIBRARY NAMES wayland-cursor++
- PATHS ${PC_WAYLANDPP_LIBRARY_DIRS})
+ HINTS ${PC_WAYLANDPP_LIBRARY_DIRS})
find_library(WAYLANDPP_EGL_LIBRARY NAMES wayland-egl++
- PATHS ${PC_WAYLANDPP_LIBRARY_DIRS})
+ HINTS ${PC_WAYLANDPP_LIBRARY_DIRS})
if(KODI_DEPENDSBUILD)
pkg_check_modules(PC_WAYLANDC wayland-client wayland-egl wayland-cursor QUIET)
@@ -49,13 +50,13 @@ if(KODI_DEPENDSBUILD)
endif()
find_library(WAYLANDC_CLIENT_LIBRARY NAMES wayland-client
- PATHS ${WAYLAND_SEARCH_PATH}
+ HINTS ${WAYLAND_SEARCH_PATH}
REQUIRED)
find_library(WAYLANDC_CURSOR_LIBRARY NAMES wayland-cursor
- PATHS ${WAYLAND_SEARCH_PATH}
+ HINTS ${WAYLAND_SEARCH_PATH}
REQUIRED)
find_library(WAYLANDC_EGL_LIBRARY NAMES wayland-egl
- PATHS ${WAYLAND_SEARCH_PATH}
+ HINTS ${WAYLAND_SEARCH_PATH}
REQUIRED)
set(WAYLANDPP_STATIC_DEPS ${WAYLANDC_CLIENT_LIBRARY}
@@ -68,7 +69,7 @@ set(WAYLANDPP_PROTOCOLS_DIR "${PC_WAYLANDPP_PKGDATADIR}/protocols" CACHE INTERNA
# wayland-scanner++ is from native/host system in case of cross-compilation, so
# it's ok if we don't find it with pkgconfig
-find_program(WAYLANDPP_SCANNER wayland-scanner++ PATHS ${PC_WAYLANDPP_SCANNER})
+find_program(WAYLANDPP_SCANNER wayland-scanner++ HINTS ${PC_WAYLANDPP_SCANNER})
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args(Waylandpp
diff --git a/cmake/modules/FindWebOSHelpers.cmake b/cmake/modules/FindWebOSHelpers.cmake
index e17f4b9ebc..0c862b7a79 100644
--- a/cmake/modules/FindWebOSHelpers.cmake
+++ b/cmake/modules/FindWebOSHelpers.cmake
@@ -8,16 +8,25 @@
# WEBOSHELPERS::WEBOSHELPERS - The webOS helpers library
if(NOT TARGET WEBOSHELPERS::WEBOSHELPERS)
+
+ if(WebOSHelpers_FIND_VERSION)
+ if(WebOSHelpers_FIND_VERSION_EXACT)
+ set(WebOSHelpers_FIND_SPEC "=${WebOSHelpers_FIND_VERSION_COMPLETE}")
+ else()
+ set(WebOSHelpers_FIND_SPEC ">=${WebOSHelpers_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_WEBOSHELPERS helpers>=2.0.0 QUIET)
+ pkg_check_modules(PC_WEBOSHELPERS helpers${WebOSHelpers_FIND_SPEC} QUIET)
endif()
find_path(WEBOSHELPERS_INCLUDE_DIR NAMES webos-helpers/libhelpers.h
- PATHS ${PC_WEBOSHELPERS_INCLUDEDIR}
+ HINTS ${PC_WEBOSHELPERS_INCLUDEDIR}
NO_CACHE)
find_library(WEBOSHELPERS_LIBRARY NAMES helpers
- PATHS ${PC_WEBOSHELPERS_LIBDIR}
+ HINTS ${PC_WEBOSHELPERS_LIBDIR}
NO_CACHE)
set(WEBOSHELPERS_VERSION ${PC_WEBOSHELPERS_VERSION})
diff --git a/cmake/modules/FindX.cmake b/cmake/modules/FindX.cmake
index 8f19b92178..0dd69405f4 100644
--- a/cmake/modules/FindX.cmake
+++ b/cmake/modules/FindX.cmake
@@ -15,13 +15,13 @@ if(NOT TARGET X::X)
endif()
find_path(X_INCLUDE_DIR NAMES X11/Xlib.h
- PATHS ${PC_X_x11_INCLUDEDIR}
+ HINTS ${PC_X_x11_INCLUDEDIR}
NO_CACHE)
find_library(X_LIBRARY NAMES X11
- PATHS ${PC_X_x11_LIBDIR}
+ HINTS ${PC_X_x11_LIBDIR}
NO_CACHE)
find_library(X_EXT_LIBRARY NAMES Xext
- PATHS ${PC_X_xext_LIBDIR}
+ HINTS ${PC_X_xext_LIBDIR}
NO_CACHE)
set(X_VERSION ${PC_X_x11_VERSION})
diff --git a/cmake/modules/FindXRandR.cmake b/cmake/modules/FindXRandR.cmake
index 7a8f1816ec..f0ad366d90 100644
--- a/cmake/modules/FindXRandR.cmake
+++ b/cmake/modules/FindXRandR.cmake
@@ -16,10 +16,10 @@ if(NOT TARGET XRandR::XRandR)
endif()
find_path(XRANDR_INCLUDE_DIR NAMES X11/extensions/Xrandr.h
- PATHS ${PC_XRANDR_INCLUDEDIR}
+ HINTS ${PC_XRANDR_INCLUDEDIR}
NO_CACHE)
find_library(XRANDR_LIBRARY NAMES Xrandr
- PATHS ${PC_XRANDR_LIBDIR}
+ HINTS ${PC_XRANDR_LIBDIR}
NO_CACHE)
set(XRANDR_VERSION ${PC_XRANDR_VERSION})
diff --git a/cmake/modules/FindXSLT.cmake b/cmake/modules/FindXSLT.cmake
index 316b35ed3d..34ef75e14c 100644
--- a/cmake/modules/FindXSLT.cmake
+++ b/cmake/modules/FindXSLT.cmake
@@ -17,9 +17,9 @@ if(NOT TARGET XSLT::XSLT)
endif()
find_path(XSLT_INCLUDE_DIR NAMES libxslt/xslt.h
- PATHS ${PC_XSLT_INCLUDEDIR})
+ HINTS ${PC_XSLT_INCLUDEDIR})
find_library(XSLT_LIBRARY NAMES xslt libxslt
- PATHS ${PC_XSLT_LIBDIR})
+ HINTS ${PC_XSLT_LIBDIR})
set(XSLT_VERSION ${PC_XSLT_VERSION})
@@ -38,6 +38,4 @@ if(NOT TARGET XSLT::XSLT)
target_link_libraries(XSLT::XSLT INTERFACE LibXml2::LibXml2)
set_property(GLOBAL APPEND PROPERTY INTERNAL_DEPS_PROP XSLT::XSLT)
endif()
-
- mark_as_advanced(XSLT_INCLUDE_DIR XSLT_LIBRARY)
endif()
diff --git a/cmake/modules/FindXkbcommon.cmake b/cmake/modules/FindXkbcommon.cmake
index 49906f9475..51916f36b6 100644
--- a/cmake/modules/FindXkbcommon.cmake
+++ b/cmake/modules/FindXkbcommon.cmake
@@ -13,10 +13,10 @@ if(NOT TARGET XKBCOMMON::XKBCOMMON)
endif()
find_path(XKBCOMMON_INCLUDE_DIR NAMES xkbcommon/xkbcommon.h
- PATHS ${PC_XKBCOMMON_INCLUDEDIR}
+ HINTS ${PC_XKBCOMMON_INCLUDEDIR}
NO_CACHE)
find_library(XKBCOMMON_LIBRARY NAMES xkbcommon
- PATHS ${PC_XKBCOMMON_LIBDIR}
+ HINTS ${PC_XKBCOMMON_LIBDIR}
NO_CACHE)
set(XKBCOMMON_VERSION ${PC_XKBCOMMON_VERSION})
diff --git a/cmake/modules/buildtools/FindGtest.cmake b/cmake/modules/buildtools/FindGtest.cmake
index eba6adc6bc..33a208d629 100644
--- a/cmake/modules/buildtools/FindGtest.cmake
+++ b/cmake/modules/buildtools/FindGtest.cmake
@@ -32,20 +32,30 @@ if(ENABLE_INTERNAL_GTEST)
BUILD_DEP_TARGET()
else()
+
+ if(Gtest_FIND_VERSION)
+ if(Gtest_FIND_VERSION_EXACT)
+ set(Gtest_FIND_SPEC "=${Gtest_FIND_VERSION_COMPLETE}")
+ else()
+ set(Gtest_FIND_SPEC ">=${Gtest_FIND_VERSION_COMPLETE}")
+ endif()
+ endif()
+
+ find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_GTEST gtest>=1.10.0 QUIET)
+ pkg_check_modules(PC_GTEST gtest${Gtest_FIND_SPEC} QUIET)
set(GTEST_VERSION ${PC_GTEST_VERSION})
elseif(WIN32)
- set(GTEST_VERSION 1.10.0)
+ set(GTEST_VERSION ${Gtest_FIND_VERSION_COMPLETE})
endif()
find_path(GTEST_INCLUDE_DIR NAMES gtest/gtest.h
- PATHS ${PC_GTEST_INCLUDEDIR})
+ HINTS ${PC_GTEST_INCLUDEDIR})
find_library(GTEST_LIBRARY_RELEASE NAMES gtest
- PATHS ${PC_GTEST_LIBDIR})
+ HINTS ${PC_GTEST_LIBDIR})
find_library(GTEST_LIBRARY_DEBUG NAMES gtestd
- PATHS ${PC_GTEST_LIBDIR})
+ HINTS ${PC_GTEST_LIBDIR})
include(SelectLibraryConfigurations)
select_library_configurations(GTEST)
diff --git a/cmake/platform/linux/gbm.cmake b/cmake/platform/linux/gbm.cmake
index d250326589..0bc433b0db 100644
--- a/cmake/platform/linux/gbm.cmake
+++ b/cmake/platform/linux/gbm.cmake
@@ -1,4 +1,4 @@
-list(APPEND PLATFORM_REQUIRED_DEPS GBM LibDRM LibInput Xkbcommon UDEV LibDisplayInfo)
+list(APPEND PLATFORM_REQUIRED_DEPS GBM LibDRM>=2.4.95 LibInput Xkbcommon UDEV LibDisplayInfo)
list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
if(APP_RENDER_SYSTEM STREQUAL "gl")
diff --git a/cmake/platform/linux/wayland.cmake b/cmake/platform/linux/wayland.cmake
index be00c12bba..92c1616c39 100644
--- a/cmake/platform/linux/wayland.cmake
+++ b/cmake/platform/linux/wayland.cmake
@@ -1,4 +1,4 @@
-list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM Xkbcommon>=0.4.1)
+list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocols>=1.7 Waylandpp>=0.2.2 LibDRM>=2.4.95 Xkbcommon>=0.4.1)
list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
if(APP_RENDER_SYSTEM STREQUAL "gl")
diff --git a/cmake/platform/linux/webos.cmake b/cmake/platform/linux/webos.cmake
index d646a08400..b028c663cf 100644
--- a/cmake/platform/linux/webos.cmake
+++ b/cmake/platform/linux/webos.cmake
@@ -4,7 +4,7 @@ include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/wayland.cmake)
# saves reworking other assumptions for linux windowing as the platform name.
list(APPEND CORE_PLATFORM_NAME_LC wayland)
-list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocolsWebOS PlayerAPIs PlayerFactory WebOSHelpers AcbAPI)
+list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocolsWebOS PlayerAPIs>=1.0.0 PlayerFactory>=1.0.0 WebOSHelpers>=2.0.0 AcbAPI)
list(APPEND ARCH_DEFINES -DTARGET_WEBOS)
set(PLATFORM_OPTIONAL_DEPS_EXCLUDE CEC)
set(ENABLE_PULSEAUDIO OFF CACHE BOOL "" FORCE)
diff --git a/cmake/platform/linux/x11.cmake b/cmake/platform/linux/x11.cmake
index 5f5b8c2f99..99884b6b57 100644
--- a/cmake/platform/linux/x11.cmake
+++ b/cmake/platform/linux/x11.cmake
@@ -1,4 +1,4 @@
-list(APPEND PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM)
+list(APPEND PLATFORM_REQUIRED_DEPS EGL X XRandR LibDRM>=2.4.95)
list(APPEND PLATFORM_OPTIONAL_DEPS VAAPI)
if(APP_RENDER_SYSTEM STREQUAL "gl")