The wadsrc/CMakeLists.txt, which controls generation of zdoom.pk3, only depends on zipdir and the dehsupp lump file, so zdoom.pk3 will only be regenerated upon compile if one of those has changed, when it should be regenerated also whenever any file under wadsrc/static has been updated.
My fix for this is to change this code from wadsrc/CMakeLists.txt from
Code: Select all
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3
COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated
DEPENDS zipdir ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp )
to
Code: Select all
add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3
COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated
DEPENDS zipdir ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp ${CMAKE_CURRENT_SOURCE_DIR}/static )
EDIT: An earlier version of this post I had changed the code to depend on the 'generated' directory instead of the actual 'dehsupp.lmp' file itself, but this was incorrect as it would cause the system not to generate the dehsupp.lmp file because nothing depended directly on it.
The wadsrc/CMakeLists.txt, which controls generation of zdoom.pk3, only depends on zipdir and the dehsupp lump file, so zdoom.pk3 will only be regenerated upon compile if one of those has changed, when it should be regenerated also whenever any file under wadsrc/static has been updated.
My fix for this is to change this code from wadsrc/CMakeLists.txt from
[code]add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3
COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated
DEPENDS zipdir ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp )[/code]
to
[code]add_custom_command( OUTPUT ${ZDOOM_OUTPUT_DIR}/zdoom.pk3
COMMAND ${CMAKE_BINARY_DIR}/tools/zipdir/zipdir ${ZDOOM_OUTPUT_DIR}/zdoom.pk3 ${CMAKE_CURRENT_SOURCE_DIR}/static ${CMAKE_CURRENT_BINARY_DIR}/generated
DEPENDS zipdir ${CMAKE_CURRENT_BINARY_DIR}/generated/dehsupp.lmp ${CMAKE_CURRENT_SOURCE_DIR}/static )[/code]
EDIT: An earlier version of this post I had changed the code to depend on the 'generated' directory instead of the actual 'dehsupp.lmp' file itself, but this was incorrect as it would cause the system not to generate the dehsupp.lmp file because nothing depended directly on it.