diff options
author | Markus Härer <markus.haerer@gmx.net> | 2024-03-09 17:59:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-09 17:59:05 +0100 |
commit | 4ddc576847c1ce6cc24d0957ab0abf50bcba07c8 (patch) | |
tree | 7b222da11e5039108f710fe283b7bbed2044cc21 /cmake/modules/FindPipewire.cmake | |
parent | 4a9cb641fb9a418e9c93732155e2fe29c2f74e9a (diff) | |
parent | 5f6b42fd111b28d5571923152c47e7094de5e3cd (diff) |
Merge pull request #24755 from fuzzard/cmake_fixups_standardisation
[cmake] Find Module cleanup and modernisation
Diffstat (limited to 'cmake/modules/FindPipewire.cmake')
-rw-r--r-- | cmake/modules/FindPipewire.cmake | 17 |
1 files changed, 13 insertions, 4 deletions
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}) |