build: improve the Linux aspect of things (#75)

Improved, fixed and streamlined cmake files. Optionally use system libraries instead of vcpkg (-DENABLE_VCPKG=OFF)
This commit is contained in:
Andrea Pappacoda 2022-08-29 07:19:48 +02:00 committed by GitHub
parent 0f24b0663e
commit f51a51df3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 368 additions and 96 deletions

20
cmake/FindZArchive.cmake Normal file
View file

@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2022 Andrea Pappacoda <andrea@pappacoda.it>
# SPDX-License-Identifier: ISC
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_search_module(zarchive IMPORTED_TARGET GLOBAL zarchive)
if (zarchive_FOUND)
add_library(ZArchive::zarchive ALIAS PkgConfig::zarchive)
endif()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ZArchive
REQUIRED_VARS
zarchive_LINK_LIBRARIES
zarchive_FOUND
VERSION_VAR
zarchive_VERSION
)