r1171 CMakeLists.txt for zdoom.pk3 doesn't depend right +fix

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Macil
Posts: 2529
Joined: Mon Mar 22, 2004 7:00 pm
Preferred Pronouns: He/Him
Location: California, USA. Previously known as "Agent ME".
Contact:

r1171 CMakeLists.txt for zdoom.pk3 doesn't depend right +fix

Post by Macil »

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.
Post Reply

Return to “Closed Bugs [GZDoom]”