aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/wxwidgets/sdl2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/wxwidgets/sdl2.patch')
-rw-r--r--vcpkg/ports/wxwidgets/sdl2.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/vcpkg/ports/wxwidgets/sdl2.patch b/vcpkg/ports/wxwidgets/sdl2.patch
new file mode 100644
index 0000000..511775c
--- /dev/null
+++ b/vcpkg/ports/wxwidgets/sdl2.patch
@@ -0,0 +1,29 @@
+diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
+index 5447d33..f5440b4 100644
+--- a/build/cmake/init.cmake
++++ b/build/cmake/init.cmake
+@@ -530,7 +530,9 @@ if(wxUSE_GUI)
+ endif()
+
+ if(wxUSE_SOUND AND wxUSE_LIBSDL AND UNIX AND NOT APPLE)
+- find_package(SDL2)
++ find_package(SDL2 CONFIG REQUIRED)
++ set(SDL2_INCLUDE_DIR "" CACHE INTERNAL "")
++ set(SDL2_LIBRARY SDL2::SDL2 CACHE INTERNAL "")
+ if(NOT SDL2_FOUND)
+ find_package(SDL)
+ endif()
+diff --git a/build/cmake/wxWidgetsConfig.cmake.in b/build/cmake/wxWidgetsConfig.cmake.in
+index 60cf762..202a8c3 100644
+--- a/build/cmake/wxWidgetsConfig.cmake.in
++++ b/build/cmake/wxWidgetsConfig.cmake.in
+@@ -2,6 +2,9 @@
+
+ include(CMakeFindDependencyMacro)
+ find_dependency(NanoSVG CONFIG)
++if("@wxUSE_LIBSDL@")
++ find_dependency(SDL2 CONFIG)
++endif()
+
+ cmake_policy(PUSH)
+ # Set policies to prevent warnings