[sdl2] Fix build when VCPKG_BUILD_TYPE is set to "release" (#13801)

* [sdl2] Fix build when VCPKG_BUILD_TYPE is set to "release"

* Convert CONTROL file to manifest
This commit is contained in:
pastdue 2020-10-07 14:47:58 -04:00 committed by GitHub
parent ab86954093
commit fdcfd8e5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 10 deletions

View File

@ -1,9 +0,0 @@
Source: sdl2
Version: 2.0.12
Port-Version: 4
Homepage: https://www.libsdl.org/download-2.0.php
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.
Feature: vulkan
Description: Vulkan functionality for SDL
Build-Depends: vulkan

View File

@ -92,7 +92,9 @@ file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_CURRENT_VERSION REGEX ${DYLIB
string(REGEX REPLACE ${DYLIB_COMPATIBILITY_VERSION_REGEX} "\\1" DYLIB_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}")
string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2" "-lSDL2d")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2" "-lSDL2d")
endif()
vcpkg_fixup_pkgconfig(
IGNORE_FLAGS "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib" "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib" "-Wl,--enable-new-dtags" "-Wl,--no-undefined" "-Wl,-undefined,error" "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}" "-Wl,-current_version,${DYLIB_CURRENT_VERSION}" "-Wl,-weak_framework,Metal" "-Wl,-weak_framework,QuartzCore"

15
ports/sdl2/vcpkg.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "sdl2",
"version-string": "2.0.12",
"port-version": 5,
"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",
"features": {
"vulkan": {
"description": "Vulkan functionality for SDL",
"dependencies": [
"vulkan"
]
}
}
}