mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-10 04:25:14 +00:00
cmake: use CONFIGURE_DEPENDS flag in GLOBs
This commit is contained in:
@@ -19,9 +19,15 @@ endfunction()
|
|||||||
# Use sdl_glob_sources to add glob sources to SDL3-shared, to SDL3-static, or to both.
|
# Use sdl_glob_sources to add glob sources to SDL3-shared, to SDL3-static, or to both.
|
||||||
function(sdl_glob_sources)
|
function(sdl_glob_sources)
|
||||||
cmake_parse_arguments(ARGS "" "" "SHARED;STATIC" ${ARGN})
|
cmake_parse_arguments(ARGS "" "" "SHARED;STATIC" ${ARGN})
|
||||||
file(GLOB shared_sources ${ARGS_SHARED})
|
if(ARGS_SHARED)
|
||||||
file(GLOB static_sources ${ARGS_STATIC})
|
file(GLOB shared_sources CONFIGURE_DEPENDS ${ARGS_SHARED})
|
||||||
file(GLOB both_sources ${ARGS_UNPARSED_ARGUMENTS})
|
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)
|
if(TARGET SDL3-shared)
|
||||||
target_sources(SDL3-shared PRIVATE ${shared_sources} ${both_sources})
|
target_sources(SDL3-shared PRIVATE ${shared_sources} ${both_sources})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user