From dfb343a5f8c9028cf0835a498737c534a1aa3358 Mon Sep 17 00:00:00 2001 From: "Joshua T. Fisher" Date: Wed, 27 Aug 2025 19:10:16 -0600 Subject: [PATCH] cmake: use CONFIGURE_DEPENDS flag in GLOBs --- cmake/sdlcommands.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cmake/sdlcommands.cmake b/cmake/sdlcommands.cmake index 1349326313..92670c191e 100644 --- a/cmake/sdlcommands.cmake +++ b/cmake/sdlcommands.cmake @@ -19,9 +19,15 @@ endfunction() # Use sdl_glob_sources to add glob sources to SDL3-shared, to SDL3-static, or to both. function(sdl_glob_sources) cmake_parse_arguments(ARGS "" "" "SHARED;STATIC" ${ARGN}) - file(GLOB shared_sources ${ARGS_SHARED}) - file(GLOB static_sources ${ARGS_STATIC}) - file(GLOB both_sources ${ARGS_UNPARSED_ARGUMENTS}) + if(ARGS_SHARED) + file(GLOB shared_sources CONFIGURE_DEPENDS ${ARGS_SHARED}) + endif() + if(ARGS_STATIC) + file(GLOB static_sources CONFIGURE_DEPENDS ${ARGS_STATIC}) + endif() + if(ARGS_UNPARSED_ARGUMENTS) + file(GLOB both_sources CONFIGURE_DEPENDS ${ARGS_UNPARSED_ARGUMENTS}) + endif() if(TARGET SDL3-shared) target_sources(SDL3-shared PRIVATE ${shared_sources} ${both_sources}) endif()