@@ -36,29 +36,33 @@ function(dssp_deploy_inference_plugins target)
3636 endif ()
3737 endforeach ()
3838
39- # srtsepinfer is built by this project. Staging must follow its target and
40- # re-run even when only the manifest changed or a deployed file was removed .
39+ # Stage copies of project libraries and interpreters because deployment rewrites
40+ # runtime paths. CMake installation requires the unmodified target binaries .
4141 set (_separation_destination "${_plugin_root} /srtsepinfer/inferenceinterpreters/demucs" )
4242 add_custom_target (srtsepinfer_deploy_plugins
43- COMMAND "${CMAKE_COMMAND } " -E make_directory "${_separation_destination} "
43+ COMMAND "${CMAKE_COMMAND } " -E make_directory "${_dependency_dir} " "${_separation_destination} "
44+ COMMAND "${CMAKE_COMMAND } " -E copy_if_different
45+ "$<TARGET_FILE :srtsepinfer >" "${_dependency_dir} /$<TARGET_FILE_NAME :srtsepinfer >"
4446 COMMAND "${CMAKE_COMMAND } " -E copy_if_different
4547 "$<TARGET_FILE :srtsepinferdemucs >" "${_separation_destination} /$<TARGET_FILE_NAME :srtsepinferdemucs >"
4648 COMMAND "${CMAKE_COMMAND } " -E copy_if_different
4749 "${SRTSEPINFER_PLUGIN_MANIFEST} " "${_separation_destination} /plugin.json"
48- DEPENDS srtsepinferdemucs "${SRTSEPINFER_PLUGIN_MANIFEST} "
49- COMMENT "Stage project-built srtsepinfer interpreter"
50+ DEPENDS srtsepinfer srtsepinferdemucs "${SRTSEPINFER_PLUGIN_MANIFEST} "
51+ COMMENT "Stage project-built srtsepinfer library and interpreter"
5052 VERBATIM
5153 )
5254
5355 add_dependencies (${target} srtsepinfer_deploy_plugins )
5456
5557 set (_beat_destination "${_plugin_root} /srtbeatinfer/inferenceinterpreters/beat-this" )
5658 add_custom_target (srtbeatinfer_deploy_plugins
57- COMMAND "${CMAKE_COMMAND } " -E make_directory "${_beat_destination} "
59+ COMMAND "${CMAKE_COMMAND } " -E make_directory "${_dependency_dir} " "${_beat_destination} "
60+ COMMAND "${CMAKE_COMMAND } " -E copy_if_different
61+ "$<TARGET_FILE :srtbeatinfer >" "${_dependency_dir} /$<TARGET_FILE_NAME :srtbeatinfer >"
5862 COMMAND "${CMAKE_COMMAND } " -E copy_if_different "$<TARGET_FILE :srtbeatinferbeatthis >" "${_beat_destination} /$<TARGET_FILE_NAME :srtbeatinferbeatthis >"
5963 COMMAND "${CMAKE_COMMAND } " -E copy_if_different "${SRTBEATINFER_PLUGIN_MANIFEST} " "${_beat_destination} /plugin.json"
60- DEPENDS srtbeatinferbeatthis "${SRTBEATINFER_PLUGIN_MANIFEST} "
61- COMMENT "Stage project-built srtbeatinfer interpreter"
64+ DEPENDS srtbeatinfer srtbeatinferbeatthis "${SRTBEATINFER_PLUGIN_MANIFEST} "
65+ COMMENT "Stage project-built srtbeatinfer library and interpreter"
6266 VERBATIM )
6367
6468 add_dependencies (${target} srtbeatinfer_deploy_plugins )
0 commit comments