Fix data dependency in cmake

This commit is contained in:
Martijn Braam
2024-12-23 17:38:23 +01:00
parent 79eab3fe1a
commit 4791d38061

View File

@@ -62,6 +62,7 @@ find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
set(GRESOURCE_C megapixels.gresource.c)
set(GRESOURCE_XML data/me.gapixels.Megapixels.gresource.xml)
file(GLOB datas data/*)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data
@@ -72,6 +73,7 @@ add_custom_command(
../${GRESOURCE_XML}
VERBATIM
MAIN_DEPENDENCY ${GRESOURCE_XML}
DEPENDS ${datas}
)
add_custom_target(