Adds in CONFIGURE_DEPENDS to any globs

This commit is contained in:
2025-02-20 05:32:43 -05:00
parent 11a7071280
commit 05a4cc3e79

View File

@@ -13,7 +13,7 @@ function(PostSetup)
endfunction()
function(AddFGLExecutable NAME SRC_SOURCES_LOCATION)
file(GLOB_RECURSE SOURCES
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
${SRC_SOURCES_LOCATION}/**.cpp
${SRC_SOURCES_LOCATION}/**.hpp
)
@@ -24,9 +24,9 @@ function(AddFGLExecutable NAME SRC_SOURCES_LOCATION)
endfunction()
function(AddFGLLibrary NAME MODE SRC_SOURCES_LOCATION INCLUDE_SOURCES_LOCATION)
file(GLOB_RECURSE CPP_SOURCES ${SRC_SOURCES_LOCATION}/**.cpp)
file(GLOB_RECURSE HPP_SOURCES ${SRC_SOURCES_LOCATION}/**.hpp)
file(GLOB_RECURSE INCLUDE_HPP_SOURCES ${INCLUDE_SOURCES_LOCATION}/**.hpp)
file(GLOB_RECURSE CPP_SOURCES CONFIGURE_DEPENDS ${SRC_SOURCES_LOCATION}/**.cpp)
file(GLOB_RECURSE HPP_SOURCES CONFIGURE_DEPENDS ${SRC_SOURCES_LOCATION}/**.hpp)
file(GLOB_RECURSE INCLUDE_HPP_SOURCES CONFIGURE_DEPENDS ${INCLUDE_SOURCES_LOCATION}/**.hpp)
add_library(${NAME} ${MODE} ${CPP_SOURCES} ${HPP_SOURCES} ${INCLUDE_SOURCES_LOCATION})
target_include_directories(${NAME} PUBLIC ${INCLUDE_SOURCES_LOCATION})
target_include_directories(${NAME} PRIVATE ${SRC_SOURCES_LOCATION})