CMake: Reset EXTRA_TOOL_SRC for each tool

Otherwise the extra sources are accumulated and leaked from previous
to all further tools.
This commit is contained in:
Alexander Akulich 2023-02-15 01:58:34 +03:00
parent bb5f0f8894
commit fc3ea43859

View file

@ -2616,6 +2616,7 @@ if(TOOLS)
string(REGEX REPLACE "\\.cpp$" "" TOOL "${T}") string(REGEX REPLACE "\\.cpp$" "" TOOL "${T}")
set(TOOL_DEPS ${DEPS}) set(TOOL_DEPS ${DEPS})
set(TOOL_LIBS ${LIBS}) set(TOOL_LIBS ${LIBS})
unset(EXTRA_TOOL_SRC)
if(TOOL MATCHES "^(dilate|map_convert_07|map_create_pixelart|map_optimize|map_extract|map_replace_image)$") if(TOOL MATCHES "^(dilate|map_convert_07|map_create_pixelart|map_optimize|map_extract|map_replace_image)$")
list(APPEND TOOL_INCLUDE_DIRS ${PNG_INCLUDE_DIRS}) list(APPEND TOOL_INCLUDE_DIRS ${PNG_INCLUDE_DIRS})
list(APPEND TOOL_DEPS $<TARGET_OBJECTS:engine-gfx>) list(APPEND TOOL_DEPS $<TARGET_OBJECTS:engine-gfx>)