vcpkg/ports/sdl2pp/fix-usage.patch
Lily Wang 8a3af1c62e
[sdl2pp] Fix usage error (#40404)
Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
2024-08-13 15:26:46 -07:00

24 lines
576 B
Diff

diff --git a/FindSDL2PP.cmake.in b/FindSDL2PP.cmake.in
index 344d2b2..06d6278 100644
--- a/FindSDL2PP.cmake.in
+++ b/FindSDL2PP.cmake.in
@@ -6,6 +6,18 @@
# SDL2PP_INCLUDE_DIRS
# SDL2PP_LIBRARIES
+include(CMakeFindDependencyMacro)
+find_dependency(SDL2 CONFIG)
+IF(@SDL2PP_WITH_IMAGE@)
+ find_dependency(SDL2_image CONFIG)
+ENDIF()
+IF(@SDL2PP_WITH_TTF@)
+ find_dependency(SDL2_ttf CONFIG)
+ENDIF()
+IF(@SDL2PP_WITH_MIXER@)
+ find_dependency(SDL2_mixer CONFIG)
+ENDIF()
+
IF(SDL2PP_INCLUDE_DIR AND SDL2PP_LIBRARY)
# in cache already
SET(SDL2PP_FIND_QUIETLY TRUE)