mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-28 06:13:18 +00:00
cmake: prefer system libraries (#216)
This commit is contained in:
parent
f522948df8
commit
f5541e3c3d
8 changed files with 147 additions and 65 deletions
15
cmake/Findzlib-ng.cmake
Normal file
15
cmake/Findzlib-ng.cmake
Normal file
|
@ -0,0 +1,15 @@
|
|||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_search_module(ZLIB_NG QUIET IMPORTED_TARGET zlib-ng)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(zlib-ng
|
||||
REQUIRED_VARS ZLIB_NG_LINK_LIBRARIES
|
||||
VERSION_VAR ZLIB_NG_VERSION
|
||||
)
|
||||
|
||||
if (zlib-ng_FOUND AND NOT TARGET zlib-ng::zlib)
|
||||
add_library(zlib-ng::zlib ALIAS PkgConfig::ZLIB_NG)
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue