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

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: r1171 CMakeLists.txt for zdoom.pk3 doesn't depend right +fix

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

by Macil » Fri Aug 15, 2008 4:09 pm

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.

Top