vcpkg/ports/ogre-next/fix_find_package_sdl2.patch

19 lines
820 B
Diff
Raw Normal View History

diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake
index 4b67ed8cb..7da194820 100644
--- a/CMake/Dependencies.cmake
+++ b/CMake/Dependencies.cmake
@@ -292,11 +292,11 @@ macro_log_feature(PYTHONLIBS_FOUND "Python" "Language bindings to use OGRE from
# Find sdl2
if(NOT ANDROID AND NOT EMSCRIPTEN)
# find script does not work in cross compilation environment
- find_package(SDL2)
+ find_package(SDL2 CONFIG)
macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "")
if(SDL2_FOUND AND WIN32 AND NOT SDL2_BINARY)
# fix linking static SDL2 on windows
- set(SDL2_LIBRARY ${SDL2_LIBRARY} winmm.lib imm32.lib version.lib)
+ set(SDL2_LIBRARY SDL2::SDL2 winmm.lib imm32.lib version.lib)
endif()
endif()