diff options
| author | 2022-12-06 04:17:44 +0100 | |
|---|---|---|
| committer | 2022-12-06 05:32:09 +0100 | |
| commit | bb3440f7c46a3a2478f63bf9609202e5996d100d (patch) | |
| tree | 7848141f5798efac8d17f67c0b9987576ba07c39 /externals/find-modules/Findzstd.cmake | |
| parent | Merge pull request #9385 from Morph1984/dynarmic-ver (diff) | |
| download | yuzu-bb3440f7c46a3a2478f63bf9609202e5996d100d.tar.gz yuzu-bb3440f7c46a3a2478f63bf9609202e5996d100d.tar.xz yuzu-bb3440f7c46a3a2478f63bf9609202e5996d100d.zip | |
cmake: correct find modules
Diffstat (limited to 'externals/find-modules/Findzstd.cmake')
| -rw-r--r-- | externals/find-modules/Findzstd.cmake | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/externals/find-modules/Findzstd.cmake b/externals/find-modules/Findzstd.cmake index 1c29f3598..1aacc41d0 100644 --- a/externals/find-modules/Findzstd.cmake +++ b/externals/find-modules/Findzstd.cmake | |||
| @@ -6,25 +6,23 @@ include(FindPackageHandleStandardArgs) | |||
| 6 | find_package(zstd QUIET CONFIG) | 6 | find_package(zstd QUIET CONFIG) |
| 7 | if (zstd_FOUND) | 7 | if (zstd_FOUND) |
| 8 | find_package_handle_standard_args(zstd CONFIG_MODE) | 8 | find_package_handle_standard_args(zstd CONFIG_MODE) |
| 9 | if (NOT TARGET zstd::zstd) | ||
| 10 | if (TARGET zstd::libzstd_shared) | ||
| 11 | set_target_properties(zstd::libzstd_shared PROPERTIES IMPORTED_GLOBAL TRUE) | ||
| 12 | add_library(zstd::zstd ALIAS zstd::libzstd_shared) | ||
| 13 | else() | ||
| 14 | set_target_properties(zstd::libzstd_static PROPERTIES IMPORTED_GLOBAL TRUE) | ||
| 15 | add_library(zstd::zstd ALIAS zstd::libzstd_static) | ||
| 16 | endif() | ||
| 17 | endif() | ||
| 18 | else() | 9 | else() |
| 19 | find_package(PkgConfig QUIET) | 10 | find_package(PkgConfig QUIET) |
| 20 | if (PKG_CONFIG_FOUND) | 11 | if (PKG_CONFIG_FOUND) |
| 21 | pkg_search_module(libzstd QUIET IMPORTED_TARGET GLOBAL libzstd) | 12 | pkg_search_module(ZSTD QUIET IMPORTED_TARGET libzstd) |
| 22 | if (libzstd_FOUND) | ||
| 23 | add_library(zstd::zstd ALIAS PkgConfig::libzstd) | ||
| 24 | endif() | ||
| 25 | endif() | 13 | endif() |
| 26 | find_package_handle_standard_args(zstd | 14 | find_package_handle_standard_args(zstd |
| 27 | REQUIRED_VARS libzstd_LINK_LIBRARIES | 15 | REQUIRED_VARS ZSTD_LINK_LIBRARIES |
| 28 | VERSION_VAR libzstd_VERSION | 16 | VERSION_VAR ZSTD_VERSION |
| 29 | ) | 17 | ) |
| 30 | endif() | 18 | endif() |
| 19 | |||
| 20 | if (zstd_FOUND AND NOT TARGET zstd::zstd) | ||
| 21 | if (TARGET zstd::libzstd_shared) | ||
| 22 | add_library(zstd::zstd ALIAS zstd::libzstd_shared) | ||
| 23 | elseif (TARGET zstd::libzstd_static) | ||
| 24 | add_library(zstd::zstd ALIAS zstd::libzstd_static) | ||
| 25 | else() | ||
| 26 | add_library(zstd::zstd ALIAS PkgConfig::ZSTD) | ||
| 27 | endif() | ||
| 28 | endif() | ||