yuzu/externals/find-modules/Findzstd.cmake
Andrea Pappacoda 064625ef58
build: simplify find modules
With this patch I've deleted a few find modules that are now unused
since the vcpkg transition, as the CMake code now forces CONFIG mode for
Catch2, fmt and nlohmann_json.

I've then simplified the lz4, opus, and zstd modules by exclusively
using pkg-config. They were using it already, but were ignoring the
result. Also, I believe that manually looking for libraries was required
for Conan to work, and it is thus not needed anymore.

Lastly, I believe that there is no platform that ships these system libs
without pkg-config/pkgconf, so requiring it should be fine.
2022-07-29 22:52:23 +02:00

20 lines
491 B
CMake

# SPDX-FileCopyrightText: 2022 yuzu Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_search_module(libzstd IMPORTED_TARGET GLOBAL libzstd)
if (libzstd_FOUND)
add_library(zstd::zstd ALIAS PkgConfig::libzstd)
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(zstd
REQUIRED_VARS
libzstd_LINK_LIBRARIES
libzstd_FOUND
VERSION_VAR libzstd_VERSION
)