summaryrefslogtreecommitdiffstats
path: root/externals
diff options
context:
space:
mode:
authorMarkus Wick <markus@selfnet.de>2021-04-08 23:49:32 +0200
committerMarkus Wick <markus@selfnet.de>2021-04-08 23:49:32 +0200
commit5096ed5e0ab91254a29a58234d1df71b4065745f (patch)
treecd7ca8a690d42792f753a300c9ffcc0c9151629b /externals
parentMerge pull request #6145 from lat9nq/nvhost_empty_memcpy (diff)
downloadyuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.tar
yuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.tar.gz
yuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.tar.bz2
yuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.tar.lz
yuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.tar.xz
yuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.tar.zst
yuzu-5096ed5e0ab91254a29a58234d1df71b4065745f.zip
Diffstat (limited to '')
-rw-r--r--externals/CMakeLists.txt6
-rw-r--r--externals/find-modules/Findopus.cmake2
-rw-r--r--externals/opus/CMakeLists.txt2
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)
endif()
# Opus
-add_subdirectory(opus)
+find_package(opus 1.3)
+if (NOT opus_FOUND)
+ message(STATUS "opus 1.3 or newer not found, falling back to externals")
+ add_subdirectory(opus EXCLUDE_FROM_ALL)
+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)
endif()
if(opus_FOUND AND NOT TARGET Opus::Opus)
- add_library(Opus::Opus UNKNOWN IMPORTED)
+ add_library(Opus::Opus UNKNOWN IMPORTED GLOBAL)
set_target_properties(Opus::Opus PROPERTIES
IMPORTED_LOCATION "${opus_LIBRARY}"
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
opus/silk/float
opus/src
)
+
+add_library(Opus::Opus ALIAS opus)