mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[sdl2] Bump to 2.26.0 (#27947)
* Bump to 2.26.0. * Add missing include for Wayland builds. * Update version history * Make `wayland` option control support altogether. - Instead of building with/without shared support. Control whether SDL is built with or without Wayland. See #27947. - Removes the need for the new patch. * Update version history. * Fix pkg-config targets. * install copyright with `vcpkg_install_copyright`. * Update version history. * Remove unecessary patch. * Update version history. * Fix UWP pc file. * Update version history.
This commit is contained in:
parent
1796ce2e96
commit
3f41432410
@ -1,45 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index aa36eb02c..feb8a3b35 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2833,8 +2833,6 @@ foreach(_hdr IN LISTS SDL2_INCLUDE_FILES)
|
||||
endforeach()
|
||||
list(APPEND SDL_GENERATED_HEADERS ${SDL2_COPIED_INCLUDE_FILES})
|
||||
|
||||
-if(NOT WINDOWS OR CYGWIN OR MINGW)
|
||||
-
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
file(RELATIVE_PATH bin_prefix_relpath "${CMAKE_INSTALL_FULL_BINDIR}" "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
@@ -2861,6 +2859,7 @@ Libs.private:")
|
||||
endif()
|
||||
|
||||
# Clean up the different lists
|
||||
+ if(NOT WINDOWS_STORE)
|
||||
listtostr(EXTRA_LIBS _EXTRA_LIBS "-l")
|
||||
set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
|
||||
list(REMOVE_DUPLICATES SDL_STATIC_LIBS)
|
||||
@@ -2870,6 +2869,7 @@ Libs.private:")
|
||||
set(SDL_LIBS ${_SDL_LIBS})
|
||||
listtostr(SDL_CFLAGS _SDL_CFLAGS "")
|
||||
set(SDL_CFLAGS ${_SDL_CFLAGS})
|
||||
+ endif()
|
||||
|
||||
# MESSAGE(STATUS "SDL_LIBS: ${SDL_LIBS}")
|
||||
# MESSAGE(STATUS "SDL_STATIC_LIBS: ${SDL_STATIC_LIBS}")
|
||||
@@ -2882,7 +2882,6 @@ Libs.private:")
|
||||
"${SDL2_BINARY_DIR}/sdl2-config" @ONLY)
|
||||
configure_file("${SDL2_SOURCE_DIR}/SDL2.spec.in"
|
||||
"${SDL2_BINARY_DIR}/SDL2.spec" @ONLY)
|
||||
-endif()
|
||||
|
||||
macro(check_add_debug_flag FLAG SUFFIX)
|
||||
check_c_compiler_flag(${FLAG} HAS_C_FLAG_${SUFFIX})
|
||||
@@ -3310,6 +3309,7 @@ if(NOT SDL2_DISABLE_INSTALL)
|
||||
install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/aclocal")
|
||||
install(FILES "LICENSE.txt" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/licenses/${PROJECT_NAME}")
|
||||
endif()
|
||||
+ install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
|
||||
endif()
|
||||
|
||||
##### Uninstall target #####
|
@ -1,16 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index aa36eb02c..c01ee2e4b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1434,11 +1434,6 @@ elseif(UNIX AND NOT APPLE AND NOT RISCOS AND NOT HAIKU)
|
||||
set(HAVE_FCITX TRUE)
|
||||
endif()
|
||||
|
||||
- pkg_search_module(IBUS ibus-1.0 ibus)
|
||||
- if(IBUS_FOUND)
|
||||
- set(HAVE_IBUS_IBUS_H TRUE)
|
||||
- target_include_directories(sdl-build-options INTERFACE "${IBUS_INCLUDE_DIRS}")
|
||||
- endif()
|
||||
|
||||
if (HAVE_IBUS_IBUS_H OR HAVE_FCITX)
|
||||
set(SDL_USE_IME 1)
|
@ -3,11 +3,8 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libsdl-org/SDL
|
||||
REF release-${VERSION}
|
||||
SHA512 4050afc804b65617f3e9097d5173edb05abd3a15872ad5c79bf85e874758c72ebf7ce9768eb1c9969099b1b82d04a1b65505774d0b851c0541e032da9b2e1ad1
|
||||
SHA512 34088a7ceea7823941fc3d16d6c5add85500d0cc30519f0fadb739939a6a87f2509f2305564a4e35a3a533db41fdb8fab95cb51143240f5fb888535e36130b82
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
0001-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch
|
||||
0002-sdl2-skip-ibus-on-linux.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
|
||||
@ -18,7 +15,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
vulkan SDL_VULKAN
|
||||
x11 SDL_X11_SHARED
|
||||
wayland SDL_WAYLAND_SHARED
|
||||
wayland SDL_WAYLAND
|
||||
)
|
||||
|
||||
if ("x11" IN_LIST FEATURES)
|
||||
@ -42,19 +39,14 @@ vcpkg_cmake_configure(
|
||||
-DSDL_LIBC=ON
|
||||
-DSDL_HIDAPI_JOYSTICK=ON
|
||||
-DSDL_TEST=OFF
|
||||
-DSDL_IBUS=OFF
|
||||
-DSDL_INSTALL_CMAKEDIR="cmake"
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
SDL_FORCE_STATIC_VCRT
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
||||
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/SDL2")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SDL2)
|
||||
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources")
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH SDL2.framework/Resources)
|
||||
endif()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
|
||||
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
@ -101,18 +93,30 @@ string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2main" "-lSDL2maind")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2 " "-lSDL2d ")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2-static " "-lSDL2-staticd ")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "-lSDL2 " "-lSDL2-static ")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "-lSDL2-static " " ")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2d " "-lSDL2-staticd ")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2-staticd " " ")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "$<$<CONFIG:Debug>:d>.lib" "")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/sdl2.pc" "-l-nodefaultlib:" "-nodefaultlib:")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "$<$<CONFIG:Debug>:d>.lib" "d")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-l-nodefaultlib:" "-nodefaultlib:")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sdl2",
|
||||
"version": "2.24.2",
|
||||
"version": "2.26.0",
|
||||
"description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.",
|
||||
"homepage": "https://www.libsdl.org/download-2.0.php",
|
||||
"license": "Zlib",
|
||||
@ -19,7 +19,7 @@
|
||||
"description": "Vulkan functionality for SDL"
|
||||
},
|
||||
"wayland": {
|
||||
"description": "Dynamically load Wayland support",
|
||||
"description": "Build with Wayland support",
|
||||
"supports": "linux"
|
||||
},
|
||||
"x11": {
|
||||
|
@ -6797,7 +6797,7 @@
|
||||
"port-version": 4
|
||||
},
|
||||
"sdl2": {
|
||||
"baseline": "2.24.2",
|
||||
"baseline": "2.26.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"sdl2-gfx": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "522729509f8704c8e4dfe59434b0b02071b34315",
|
||||
"version": "2.26.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "e44330d071add4e1c92af34650cfc3b20642640f",
|
||||
"version": "2.24.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user