diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7da1644..50af33916 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,11 +49,13 @@ function( add_pk3 PK3_NAME PK3_DIR ) DEPENDS zipdir ) endif() - # Touch the zipdir executable here so that the pk3s are forced to - # rebuild each time since their dependecy has "changed." - add_custom_target( ${PK3_TARGET} ALL - COMMAND ${CMAKE_COMMAND} -E touch $ - DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} ) + file(GLOB PK3_SRCS ${PK3_DIR}/*) + # Touch the zipdir executable here so that the pk3s are forced to + # rebuild each time since their dependecy has "changed." + add_custom_target( ${PK3_TARGET} ALL + COMMAND ${CMAKE_COMMAND} -E touch $ + DEPENDS ${ZDOOM_OUTPUT_DIR}/${PK3_NAME} + SOURCES "${PK3_SRCS}") endfunction() # Macro for building libraries without debugging information