summaryrefslogtreecommitdiffstats
path: root/externals/find-modules/FindOpus.cmake
diff options
context:
space:
mode:
authorAndrea Pappacoda <andrea@pappacoda.it>2022-08-01 12:31:31 +0200
committerAndrea Pappacoda <andrea@pappacoda.it>2022-08-01 12:31:31 +0200
commitadc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6 (patch)
treefcfa229ec1ace9288611d04c84508594becb763c /externals/find-modules/FindOpus.cmake
parentbuild: simplify find modules (diff)
downloadyuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.tar
yuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.tar.gz
yuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.tar.bz2
yuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.tar.lz
yuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.tar.xz
yuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.tar.zst
yuzu-adc8c03fe463c9c0aaa2cfcbc502bc65dc7b99b6.zip
Diffstat (limited to 'externals/find-modules/FindOpus.cmake')
-rw-r--r--externals/find-modules/FindOpus.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/externals/find-modules/FindOpus.cmake b/externals/find-modules/FindOpus.cmake
new file mode 100644
index 000000000..b68a6046b
--- /dev/null
+++ b/externals/find-modules/FindOpus.cmake
@@ -0,0 +1,19 @@
+# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+find_package(PkgConfig)
+
+if (PKG_CONFIG_FOUND)
+ pkg_search_module(opus IMPORTED_TARGET GLOBAL opus)
+ if (opus_FOUND)
+ add_library(Opus::opus ALIAS PkgConfig::opus)
+ endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Opus
+ REQUIRED_VARS
+ opus_LINK_LIBRARIES
+ opus_FOUND
+ VERSION_VAR opus_VERSION
+)