build: make targets properly rebuild when templates or compiler changed

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2023-09-02 20:14:52 +03:00
parent 231e055faf
commit b028fea59a
4 changed files with 24 additions and 11 deletions

View File

@ -12,6 +12,7 @@ add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS
"${PROJECT_SOURCE_DIR}/examples/patches/physics_girl_st.yml"
${compilecmd}
OUTPUT
physics_girl_st.asm
physics_girl_st.h
@ -21,7 +22,6 @@ add_custom_command(
)
add_library(physics_girl_st physics_girl_st.asm)
add_dependencies(physics_girl_st sointu-compiler)
if(WIN32)
add_executable(cplay-winmm

View File

@ -15,6 +15,7 @@ function(add_asm_example identifier songfile architecture sizeof_void_ptr window
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS
${songfile}
${compilecmd}
OUTPUT
${songprefix}_${architecture}.asm
${songprefix}_${architecture}.h
@ -50,7 +51,6 @@ function(add_asm_example identifier songfile architecture sizeof_void_ptr window
target_compile_definitions(${identifier}-${architecture} PRIVATE TRACK_INCLUDE="${songprefix}_${architecture}.inc")
# Set up dependencies
add_dependencies(${identifier}-${architecture} sointu-compiler)
add_dependencies(examples ${identifier}-${architecture})
endfunction()