diff options
| author | 2021-04-10 02:27:02 -0700 | |
|---|---|---|
| committer | 2021-04-10 02:27:02 -0700 | |
| commit | 1063e0be483c59d0d3f31eb62ef888e00bdaee7d (patch) | |
| tree | c32c479a59ad290f5c0db86a19e39a4f9a0fa95a /externals | |
| parent | Merge pull request #6099 from bunnei/derive-mem (diff) | |
| parent | externals: Search for shared opus installation. (diff) | |
| download | yuzu-1063e0be483c59d0d3f31eb62ef888e00bdaee7d.tar.gz yuzu-1063e0be483c59d0d3f31eb62ef888e00bdaee7d.tar.xz yuzu-1063e0be483c59d0d3f31eb62ef888e00bdaee7d.zip | |
Merge pull request #6172 from degasus/cmake_opus
externals: Search for shared opus installation.
Diffstat (limited to 'externals')
| -rw-r--r-- | externals/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | externals/find-modules/Findopus.cmake | 2 | ||||
| -rw-r--r-- | externals/opus/CMakeLists.txt | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 851c282b4..891a47c3c 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt | |||
| @@ -97,4 +97,8 @@ if (ENABLE_WEB_SERVICE) | |||
| 97 | endif() | 97 | endif() |
| 98 | 98 | ||
| 99 | # Opus | 99 | # Opus |
| 100 | add_subdirectory(opus) | 100 | find_package(opus 1.3) |
| 101 | if (NOT opus_FOUND) | ||
| 102 | message(STATUS "opus 1.3 or newer not found, falling back to externals") | ||
| 103 | add_subdirectory(opus EXCLUDE_FROM_ALL) | ||
| 104 | endif() | ||
diff --git a/externals/find-modules/Findopus.cmake b/externals/find-modules/Findopus.cmake index de84bd995..2bce56122 100644 --- a/externals/find-modules/Findopus.cmake +++ b/externals/find-modules/Findopus.cmake | |||
| @@ -28,7 +28,7 @@ if(opus_FOUND) | |||
| 28 | endif() | 28 | endif() |
| 29 | 29 | ||
| 30 | if(opus_FOUND AND NOT TARGET Opus::Opus) | 30 | if(opus_FOUND AND NOT TARGET Opus::Opus) |
| 31 | add_library(Opus::Opus UNKNOWN IMPORTED) | 31 | add_library(Opus::Opus UNKNOWN IMPORTED GLOBAL) |
| 32 | set_target_properties(Opus::Opus PROPERTIES | 32 | set_target_properties(Opus::Opus PROPERTIES |
| 33 | IMPORTED_LOCATION "${opus_LIBRARY}" | 33 | IMPORTED_LOCATION "${opus_LIBRARY}" |
| 34 | INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}" | 34 | INTERFACE_COMPILE_OPTIONS "${PC_opus_CFLAGS_OTHER}" |
diff --git a/externals/opus/CMakeLists.txt b/externals/opus/CMakeLists.txt index 94a86551f..16f5af9f2 100644 --- a/externals/opus/CMakeLists.txt +++ b/externals/opus/CMakeLists.txt | |||
| @@ -252,3 +252,5 @@ PRIVATE | |||
| 252 | opus/silk/float | 252 | opus/silk/float |
| 253 | opus/src | 253 | opus/src |
| 254 | ) | 254 | ) |
| 255 | |||
| 256 | add_library(Opus::Opus ALIAS opus) | ||