summaryrefslogtreecommitdiff
path: root/externals/find-modules/Findopus.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'externals/find-modules/Findopus.cmake')
-rw-r--r--externals/find-modules/Findopus.cmake44
1 files changed, 0 insertions, 44 deletions
diff --git a/externals/find-modules/Findopus.cmake b/externals/find-modules/Findopus.cmake
deleted file mode 100644
index ec7b4f61f..000000000
--- a/externals/find-modules/Findopus.cmake
+++ /dev/null
@@ -1,44 +0,0 @@
1# SPDX-FileCopyrightText: 2020 yuzu Emulator Project
2# SPDX-License-Identifier: GPL-2.0-or-later
3
4find_package(PkgConfig QUIET)
5pkg_check_modules(PC_opus QUIET opus)
6
7find_path(opus_INCLUDE_DIR
8 NAMES opus.h
9 PATHS ${PC_opus_INCLUDE_DIRS}
10 PATH_SUFFIXES opus
11)
12find_library(opus_LIBRARY
13 NAMES opus
14 PATHS ${PC_opus_LIBRARY_DIRS}
15)
16
17include(FindPackageHandleStandardArgs)
18find_package_handle_standard_args(opus
19 FOUND_VAR opus_FOUND
20 REQUIRED_VARS
21 opus_LIBRARY
22 opus_INCLUDE_DIR
23 VERSION_VAR opus_VERSION
24)
25
26if(opus_FOUND)
27 set(Opus_LIBRARIES ${opus_LIBRARY})
28 set(Opus_INCLUDE_DIRS ${opus_INCLUDE_DIR})
29 set(Opus_DEFINITIONS ${PC_opus_CFLAGS_OTHER})
30endif()
31
32if(opus_FOUND AND NOT TARGET Opus::Opus)
33 add_library(Opus::Opus UNKNOWN IMPORTED GLOBAL)
34 set_target_properties(Opus::Opus PROPERTIES
35 IMPORTED_LOCATION "${opus_LIBRARY}"
36 INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}"
37 INTERFACE_INCLUDE_DIRECTORIES "${opus_INCLUDE_DIR}"
38 )
39endif()
40
41mark_as_advanced(
42 opus_INCLUDE_DIR
43 opus_LIBRARY
44)