summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorenzu.ru <enzuru@users.noreply.github.com>2026-05-07 14:15:10 -0700
committerGitHub <noreply@github.com>2026-05-07 17:15:10 -0400
commit7dd94464cec0a7a7433e8aba6e0a1bbecf038039 (patch)
tree3a80e727a2569908dd91ccb36cee89091046dfba /CMake
parentff235099f643712546c378ab272bea4ba7773b0c (diff)
Improve Nix support (#1643)
* Improve Nix support * fixes * Update BUILDING.md Co-authored-by: ProverbialPennance <36955346+ProverbialPennance@users.noreply.github.com> --------- Co-authored-by: ProverbialPennance <36955346+ProverbialPennance@users.noreply.github.com>
Diffstat (limited to 'CMake')
-rw-r--r--CMake/FindOpusFile.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMake/FindOpusFile.cmake b/CMake/FindOpusFile.cmake
index ed3b4b7ba..42377d049 100644
--- a/CMake/FindOpusFile.cmake
+++ b/CMake/FindOpusFile.cmake
@@ -6,9 +6,15 @@
# OPUSFILE_LIBRARY - Path to the opusfile library
# OPUSFILE_LIBRARIES - Full list of libraries to link (opusfile, opus, ogg)
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_OPUSFILE QUIET opusfile)
+endif()
+
# Search for the OpusFile header
find_path(OPUSFILE_INCLUDE_DIR
NAMES opusfile.h
+ HINTS ${PC_OPUSFILE_INCLUDE_DIRS}
PATHS /usr/include/opus /usr/local/include/opus /opt/local/include/opus /opt/homebrew/include/opus
DOC "Directory where opusfile.h is located"
)
@@ -16,6 +22,7 @@ find_path(OPUSFILE_INCLUDE_DIR
# Search for the OpusFile library
find_library(OPUSFILE_LIBRARY
NAMES opusfile
+ HINTS ${PC_OPUSFILE_LIBRARY_DIRS}
DOC "Path to the libopusfile library"
)