FindOpus.cmake 470 B

12345678910111213141516171819
  1. # SPDX-FileCopyrightText: 2022 yuzu Emulator Project
  2. # SPDX-License-Identifier: GPL-2.0-or-later
  3. find_package(PkgConfig)
  4. if (PKG_CONFIG_FOUND)
  5. pkg_search_module(opus IMPORTED_TARGET GLOBAL opus)
  6. if (opus_FOUND)
  7. add_library(Opus::opus ALIAS PkgConfig::opus)
  8. endif()
  9. endif()
  10. include(FindPackageHandleStandardArgs)
  11. find_package_handle_standard_args(Opus
  12. REQUIRED_VARS
  13. opus_LINK_LIBRARIES
  14. opus_FOUND
  15. VERSION_VAR opus_VERSION
  16. )