[sdl2pp] Allowing disabling SDL2 Satallite library installation via add feature (#40195)

Co-authored-by: Jon <v-zhli17@microsoft.com>
This commit is contained in:
JonLiu1993 2024-08-02 05:32:30 +08:00 committed by GitHub
parent 09fe6ab6ca
commit f6565b6ebf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 4 deletions

View File

@ -7,6 +7,14 @@ vcpkg_from_github(
PATCHES fix-dependencies.patch
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
sdl2-image SDL2PP_WITH_IMAGE
sdl2-mixer SDL2PP_WITH_MIXER
sdl2-ttf SDL2PP_WITH_TTF
)
file(REMOVE "${SOURCE_PATH}/cmake/FindSDL2.cmake"
"${SOURCE_PATH}/cmake/FindSDL2_image.cmake"
"${SOURCE_PATH}/cmake/FindSDL2_mixer.cmake"
@ -18,6 +26,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL2PP_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DCMAKEMODDIR=share/${PORT}
-DSDL2PP_WITH_EXAMPLES=OFF
-DSDL2PP_WITH_TESTS=OFF
@ -43,4 +52,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING.txt")

View File

@ -1,7 +1,7 @@
{
"name": "sdl2pp",
"version": "0.16.1",
"port-version": 8,
"port-version": 9,
"description": "C++11 bindings/wrapper for SDL2",
"homepage": "https://sdl2pp.amdmi3.ru",
"license": "Zlib",
@ -17,5 +17,25 @@
"name": "vcpkg-cmake",
"host": true
}
]
],
"features": {
"sdl2-image": {
"description": "Enable SDL2_image support",
"dependencies": [
"sdl2-image"
]
},
"sdl2-mixer": {
"description": "Enable SDL2_mixer support",
"dependencies": [
"sdl2-mixer"
]
},
"sdl2-ttf": {
"description": "Enable SDL2_ttf support",
"dependencies": [
"sdl2-ttf"
]
}
}
}

View File

@ -8094,7 +8094,7 @@
},
"sdl2pp": {
"baseline": "0.16.1",
"port-version": 8
"port-version": 9
},
"seacas": {
"baseline": "2022-11-22",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "16f7b3b1b4e13c6a5d9320dae876c1119a9b10c6",
"version": "0.16.1",
"port-version": 9
},
{
"git-tree": "77e56d86771c6c97f8d9c7d8fa121dc2312ef509",
"version": "0.16.1",