From 1fd02514e61cd854b06d2fdb97bedcd4c41f27fb Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Bannier Date: Fri, 10 Apr 2026 10:35:20 +0200 Subject: [PATCH] chore: simplify SDL2 guard in examples/CMakeLists.txt The EXISTS check for third-party/CMakeLists.txt was always true (the file is tracked in git), so it added noise without guarding anything. Drop it and trim the skip message to match. Follow-up cleanup to the imgui FetchContent fix from 6fd1ea0 / #6. Co-Authored-By: Claude Opus 4.6 (1M context) --- examples/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 96836a8..98c3c0e 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -13,7 +13,7 @@ target_link_libraries(sam3_profile_edgetam PRIVATE sam3) # SDL2 + ImGui are optional — build only if SDL2 is found. find_package(SDL2 QUIET) -if(SDL2_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/third-party/CMakeLists.txt") +if(SDL2_FOUND) add_subdirectory(third-party) add_executable(sam3_image main_image.cpp) @@ -22,5 +22,5 @@ if(SDL2_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/third-party/CMakeLists.txt add_executable(sam3_video main_video.cpp) target_link_libraries(sam3_video PRIVATE sam3 imgui-sdl2 SDL2::SDL2) else() - message(STATUS "SDL2 not found or third-party/ missing — skipping GUI examples") + message(STATUS "SDL2 not found — skipping GUI examples") endif()