diff options
Diffstat (limited to 'externals/find-modules/Findopus.cmake')
| -rw-r--r-- | externals/find-modules/Findopus.cmake | 44 |
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 | |||
| 4 | find_package(PkgConfig QUIET) | ||
| 5 | pkg_check_modules(PC_opus QUIET opus) | ||
| 6 | |||
| 7 | find_path(opus_INCLUDE_DIR | ||
| 8 | NAMES opus.h | ||
| 9 | PATHS ${PC_opus_INCLUDE_DIRS} | ||
| 10 | PATH_SUFFIXES opus | ||
| 11 | ) | ||
| 12 | find_library(opus_LIBRARY | ||
| 13 | NAMES opus | ||
| 14 | PATHS ${PC_opus_LIBRARY_DIRS} | ||
| 15 | ) | ||
| 16 | |||
| 17 | include(FindPackageHandleStandardArgs) | ||
| 18 | find_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 | |||
| 26 | if(opus_FOUND) | ||
| 27 | set(Opus_LIBRARIES ${opus_LIBRARY}) | ||
| 28 | set(Opus_INCLUDE_DIRS ${opus_INCLUDE_DIR}) | ||
| 29 | set(Opus_DEFINITIONS ${PC_opus_CFLAGS_OTHER}) | ||
| 30 | endif() | ||
| 31 | |||
| 32 | if(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 | ) | ||
| 39 | endif() | ||
| 40 | |||
| 41 | mark_as_advanced( | ||
| 42 | opus_INCLUDE_DIR | ||
| 43 | opus_LIBRARY | ||
| 44 | ) | ||