diff options
Diffstat (limited to 'externals/find-modules/FindOpus.cmake')
| -rw-r--r-- | externals/find-modules/FindOpus.cmake | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/externals/find-modules/FindOpus.cmake b/externals/find-modules/FindOpus.cmake index b68a6046b..2ba515352 100644 --- a/externals/find-modules/FindOpus.cmake +++ b/externals/find-modules/FindOpus.cmake | |||
| @@ -1,19 +1,17 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2022 yuzu Emulator Project | 1 | # SPDX-FileCopyrightText: 2022 yuzu Emulator Project |
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later | 2 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | find_package(PkgConfig) | 4 | find_package(PkgConfig QUIET) |
| 5 | |||
| 6 | if (PKG_CONFIG_FOUND) | 5 | if (PKG_CONFIG_FOUND) |
| 7 | pkg_search_module(opus IMPORTED_TARGET GLOBAL opus) | 6 | pkg_search_module(OPUS QUIET IMPORTED_TARGET opus) |
| 8 | if (opus_FOUND) | ||
| 9 | add_library(Opus::opus ALIAS PkgConfig::opus) | ||
| 10 | endif() | ||
| 11 | endif() | 7 | endif() |
| 12 | 8 | ||
| 13 | include(FindPackageHandleStandardArgs) | 9 | include(FindPackageHandleStandardArgs) |
| 14 | find_package_handle_standard_args(Opus | 10 | find_package_handle_standard_args(Opus |
| 15 | REQUIRED_VARS | 11 | REQUIRED_VARS OPUS_LINK_LIBRARIES |
| 16 | opus_LINK_LIBRARIES | 12 | VERSION_VAR OPUS_VERSION |
| 17 | opus_FOUND | ||
| 18 | VERSION_VAR opus_VERSION | ||
| 19 | ) | 13 | ) |
| 14 | |||
| 15 | if (Opus_FOUND AND NOT TARGET Opus::opus) | ||
| 16 | add_library(Opus::opus ALIAS PkgConfig::OPUS) | ||
| 17 | endif() | ||