aboutsummaryrefslogtreecommitdiff
path: root/ports/libwebp/0008-sdl.patch
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-02-05 17:52:51 -0800
committerGitHub <noreply@github.com>2020-02-05 17:52:51 -0800
commit0ba50612fbbfb9d64f9c60825847c12f956666c6 (patch)
tree7a5d2dd43d48b13ecbd7e843934283747f991ca6 /ports/libwebp/0008-sdl.patch
parentd3b4a5a307f5b551190543a75f3ea2529aa0f02d (diff)
parent3310f8e728e95071943097fe07b4f0135394f4e0 (diff)
downloadvcpkg-0ba50612fbbfb9d64f9c60825847c12f956666c6.tar.gz
vcpkg-0ba50612fbbfb9d64f9c60825847c12f956666c6.zip
Merge pull request #9635 from Neumann-A/improve_libwebp
[libwebp] Update to 1.1.0 and improve portfile
Diffstat (limited to 'ports/libwebp/0008-sdl.patch')
-rw-r--r--ports/libwebp/0008-sdl.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/ports/libwebp/0008-sdl.patch b/ports/libwebp/0008-sdl.patch
new file mode 100644
index 000000000..7f3363f7b
--- /dev/null
+++ b/ports/libwebp/0008-sdl.patch
@@ -0,0 +1,36 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7b0d2fa55..efd10887b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -563,10 +563,11 @@ if(WEBP_BUILD_EXTRAS)
+ endif()
+
+ if(WEBP_BUILD_WEBP_JS)
++ find_package(SDL REQUIRED)
+ # JavaScript version
+ add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
+- target_link_libraries(webp_js webpdecoder SDL)
+- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
++ target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY})
++ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
+ set(WEBP_HAVE_SDL 1)
+ set_target_properties(
+ webp_js
+@@ -578,14 +579,14 @@ if(WEBP_BUILD_WEBP_JS)
+
+ # WASM version
+ add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c)
+- target_link_libraries(webp_wasm webpdecoder SDL)
+- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
++ target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY})
++ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR})
+ set_target_properties(
+ webp_wasm
+ PROPERTIES LINK_FLAGS "-s WASM=1 \
+ -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \
+ -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
+- target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL)
++ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H)
+
+ target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN)
+ endif()