mirror of
https://github.com/ZDoom/ZMusic.git
synced 2025-02-17 09:02:23 +00:00
vcpkg improvements
This commit is contained in:
parent
0a7dc86a55
commit
1d5e34466d
3 changed files with 16 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
||||||
cmake_minimum_required(VERSION 3.13...3.19)
|
cmake_minimum_required(VERSION 3.13...3.19)
|
||||||
|
|
||||||
|
if (VCPKG_LIBSNDFILE)
|
||||||
|
list(APPEND VCPKG_MANIFEST_FEATURES "vcpkg-libsndfile")
|
||||||
|
endif()
|
||||||
|
|
||||||
project(ZMusic
|
project(ZMusic
|
||||||
VERSION 1.1.12
|
VERSION 1.1.12
|
||||||
LANGUAGES C CXX
|
LANGUAGES C CXX
|
||||||
|
@ -8,6 +13,8 @@ if (VCPKG_TOOLCHAIN)
|
||||||
if(VCPKG_TARGET_TRIPLET MATCHES "-static$")
|
if(VCPKG_TARGET_TRIPLET MATCHES "-static$")
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(VCPKG_LIBSNDFILE "Import libsndfile from vcpkg" OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
|
|
|
@ -156,6 +156,10 @@ PROPERTIES
|
||||||
SOVERSION ${PROJECT_VERSION_MAJOR}
|
SOVERSION ${PROJECT_VERSION_MAJOR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (VCPKG_TOOLCHAIN)
|
||||||
|
x_vcpkg_install_local_dependencies(TARGETS zmusic zmusiclite DESTINATION ".")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ZMUSIC_INSTALL)
|
if(ZMUSIC_INSTALL)
|
||||||
install(TARGETS zmusic EXPORT ZMusicFullTargets
|
install(TARGETS zmusic EXPORT ZMusicFullTargets
|
||||||
PUBLIC_HEADER
|
PUBLIC_HEADER
|
||||||
|
|
|
@ -5,14 +5,18 @@
|
||||||
"description": "GZDoom's music system as a standalone library",
|
"description": "GZDoom's music system as a standalone library",
|
||||||
"features":
|
"features":
|
||||||
{
|
{
|
||||||
|
"vcpkg-libsndfile":
|
||||||
|
{
|
||||||
"description": "Use libsndfile provided by vcpkg.",
|
"description": "Use libsndfile provided by vcpkg.",
|
||||||
"dependencies": [
|
"dependencies":
|
||||||
|
[
|
||||||
{
|
{
|
||||||
"name": "libsndfile",
|
"name": "libsndfile",
|
||||||
"default-features": false,
|
"default-features": false,
|
||||||
"features": [ "mpeg", "external-libs" ]
|
"features": [ "mpeg", "external-libs" ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue