vcpkg improvements

This commit is contained in:
Cacodemon345 2023-08-16 10:36:07 +06:00 committed by Christoph Oelckers
parent 0a7dc86a55
commit 1d5e34466d
3 changed files with 16 additions and 1 deletions

View file

@ -1,4 +1,9 @@
cmake_minimum_required(VERSION 3.13...3.19)
if (VCPKG_LIBSNDFILE)
list(APPEND VCPKG_MANIFEST_FEATURES "vcpkg-libsndfile")
endif()
project(ZMusic
VERSION 1.1.12
LANGUAGES C CXX
@ -8,6 +13,8 @@ if (VCPKG_TOOLCHAIN)
if(VCPKG_TARGET_TRIPLET MATCHES "-static$")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
option(VCPKG_LIBSNDFILE "Import libsndfile from vcpkg" OFF)
endif()
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

View file

@ -156,6 +156,10 @@ PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
)
if (VCPKG_TOOLCHAIN)
x_vcpkg_install_local_dependencies(TARGETS zmusic zmusiclite DESTINATION ".")
endif()
if(ZMUSIC_INSTALL)
install(TARGETS zmusic EXPORT ZMusicFullTargets
PUBLIC_HEADER

View file

@ -5,14 +5,18 @@
"description": "GZDoom's music system as a standalone library",
"features":
{
"vcpkg-libsndfile":
{
"description": "Use libsndfile provided by vcpkg.",
"dependencies": [
"dependencies":
[
{
"name": "libsndfile",
"default-features": false,
"features": [ "mpeg", "external-libs" ]
}
]
}
},
"dependencies": [
{