diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2020-01-16 05:45:48 +0800 |
|---|---|---|
| committer | nicole mazzuca <mazzucan@outlook.com> | 2020-01-15 13:45:48 -0800 |
| commit | 2dde9fb51482f7d7609f83172d23302974dfcf37 (patch) | |
| tree | 86337166e120d21ba9b2808e8bd90651afb5330d | |
| parent | d989ad416b923a9f895c4bddc446d1ef370a3af8 (diff) | |
| download | vcpkg-2dde9fb51482f7d7609f83172d23302974dfcf37.tar.gz vcpkg-2dde9fb51482f7d7609f83172d23302974dfcf37.zip | |
[sfml] Declare Windows library export (#9190)
| -rw-r--r-- | ports/sfml/CONTROL | 2 | ||||
| -rw-r--r-- | ports/sfml/export-win-libs.patch | 26 | ||||
| -rw-r--r-- | ports/sfml/portfile.cmake | 8 |
3 files changed, 31 insertions, 5 deletions
diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index ab574561c..9f5942639 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,5 +1,5 @@ Source: sfml -Version: 2.5.1-4 +Version: 2.5.1-5 Homepage: https://github.com/sfml/sfml Description: Simple and fast multimedia library Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb diff --git a/ports/sfml/export-win-libs.patch b/ports/sfml/export-win-libs.patch new file mode 100644 index 000000000..210b6e52e --- /dev/null +++ b/ports/sfml/export-win-libs.patch @@ -0,0 +1,26 @@ +diff --git a/src/SFML/System/CMakeLists.txt b/src/SFML/System/CMakeLists.txt +index d1b712d..5c12801 100644 +--- a/src/SFML/System/CMakeLists.txt ++++ b/src/SFML/System/CMakeLists.txt +@@ -96,7 +96,7 @@ endif() + if(SFML_OS_LINUX) + target_link_libraries(sfml-system PRIVATE rt) + elseif(SFML_OS_WINDOWS) +- target_link_libraries(sfml-system PRIVATE winmm) ++ target_link_libraries(sfml-system PUBLIC winmm) + elseif(SFML_OS_ANDROID) + target_link_libraries(sfml-system PRIVATE android log) + endif() +diff --git a/src/SFML/Window/CMakeLists.txt b/src/SFML/Window/CMakeLists.txt +index 98ea439..53c1ac7 100644 +--- a/src/SFML/Window/CMakeLists.txt ++++ b/src/SFML/Window/CMakeLists.txt +@@ -276,7 +276,7 @@ if(SFML_OS_LINUX) + sfml_find_package(UDev INCLUDE "UDEV_INCLUDE_DIR" LINK "UDEV_LIBRARIES") + target_link_libraries(sfml-window PRIVATE UDev) + elseif(SFML_OS_WINDOWS) +- target_link_libraries(sfml-window PRIVATE winmm gdi32) ++ target_link_libraries(sfml-window PUBLIC winmm gdi32) + elseif(SFML_OS_FREEBSD) + target_link_libraries(sfml-window PRIVATE usbhid) + elseif(SFML_OS_MACOSX) diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index 793489b97..ce2fc41fd 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -1,11 +1,11 @@ - -include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO SFML/SFML REF 2.5.1 HEAD_REF master SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59 - PATCHES use-system-freetype.patch + PATCHES + use-system-freetype.patch + export-win-libs.patch ) file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) @@ -54,4 +54,4 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright) +file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
