diff options
| author | pastdue <30942300+past-due@users.noreply.github.com> | 2020-10-07 14:47:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-07 11:47:58 -0700 |
| commit | fdcfd8e5d79a9551249b60251edb81733fd227db (patch) | |
| tree | db6a6fda2e7daecfdd8b69079cdec6a840d13795 | |
| parent | ab8695409326b44a5b62594548b3627a36aec472 (diff) | |
| download | vcpkg-fdcfd8e5d79a9551249b60251edb81733fd227db.tar.gz vcpkg-fdcfd8e5d79a9551249b60251edb81733fd227db.zip | |
[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
| -rw-r--r-- | ports/sdl2/CONTROL | 9 | ||||
| -rw-r--r-- | ports/sdl2/portfile.cmake | 4 | ||||
| -rw-r--r-- | ports/sdl2/vcpkg.json | 15 |
3 files changed, 18 insertions, 10 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL deleted file mode 100644 index 5aa62903a..000000000 --- a/ports/sdl2/CONTROL +++ /dev/null @@ -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 diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index d9ed365f4..57ef470df 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -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" diff --git a/ports/sdl2/vcpkg.json b/ports/sdl2/vcpkg.json new file mode 100644 index 000000000..27b693359 --- /dev/null +++ b/ports/sdl2/vcpkg.json @@ -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" + ] + } + } +} |
