From ef264d31f8f7fceb675ddc5dc96b82af567dac59 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Sun, 6 Jul 2025 00:29:46 -0500 Subject: [PATCH] Add fetchcontent fixes for SDL2 --- CMakeLists.txt | 6 ++++++ src/runtime_methods/sdl2.cpp | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11ab1e5..8bc2d60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,6 +189,9 @@ CROSSLANG_LINK_DEPS(crosslang_static) if(CROSSLANG_FETCHCONTENT) target_link_libraries(crosslang_static PUBLIC tessesframework) +if(TESSESFRAMEWORK_FETCHCONTENT AND TESSESFRAMEWORK_ENABLE_SDL2) +sdl2_fix(crosslang_static) +endif() else() target_link_libraries(crosslang_static PUBLIC TessesFramework::tessesframework) endif() @@ -202,6 +205,9 @@ add_library(crosslang_shared SHARED ${CROSSLANG_SOURCE}) CROSSLANG_LINK_DEPS(crosslang_shared) if(CROSSLANG_FETCHCONTENT) target_link_libraries(crosslang_shared PUBLIC tessesframework_shared) +if(TESSESFRAMEWORK_FETCHCONTENT AND TESSESFRAMEWORK_ENABLE_SDL2) +sdl2_fix(crosslang_shared) +endif() else() target_link_libraries(crosslang_shared PUBLIC TessesFramework::tessesframework_shared) endif() diff --git a/src/runtime_methods/sdl2.cpp b/src/runtime_methods/sdl2.cpp index e8eb6a2..4c220ba 100644 --- a/src/runtime_methods/sdl2.cpp +++ b/src/runtime_methods/sdl2.cpp @@ -3,10 +3,9 @@ #include "CrossLang.hpp" #include #if defined(TESSESFRAMEWORK_ENABLE_SDL2) -#include -#include -#include +#include #include +#include #include #include #include @@ -1251,4 +1250,4 @@ namespace Tesses::CrossLang #endif } -} \ No newline at end of file +}