新增windows支持

This commit is contained in:
2026-09-07 23:48:20 +08:00
parent 6837ecada9
commit bd0771747d
5 changed files with 156 additions and 20 deletions
+12 -4
View File
@@ -76,19 +76,27 @@ if(DTS_BUILD_GUI)
if(DTS_BUILD_RUNTIME_PLUGINS)
add_dependencies(DateToSpine
dts_runtime_38 dts_runtime_40 dts_runtime_41 dts_runtime_42 dts_runtime_43)
# Runtime plugin destination differs by platform:
# - macOS: inside the .app bundle (Contents/PlugIns/runtimes)
# - Windows/other: alongside the executable
if(APPLE)
set(DTS_RUNTIME_PLUGIN_DIR "$<TARGET_BUNDLE_DIR:DateToSpine>/Contents/PlugIns/runtimes")
else()
set(DTS_RUNTIME_PLUGIN_DIR "$<TARGET_FILE_DIR:DateToSpine>/runtimes")
endif()
foreach(runtime_line IN ITEMS 38 40 41 42 43)
add_custom_command(TARGET dts_runtime_${runtime_line} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
"$<TARGET_BUNDLE_DIR:DateToSpine>/Contents/PlugIns/runtimes"
"${DTS_RUNTIME_PLUGIN_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:dts_runtime_${runtime_line}>"
"$<TARGET_BUNDLE_DIR:DateToSpine>/Contents/PlugIns/runtimes/")
"${DTS_RUNTIME_PLUGIN_DIR}/")
add_custom_command(TARGET DateToSpine POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory
"$<TARGET_BUNDLE_DIR:DateToSpine>/Contents/PlugIns/runtimes"
"${DTS_RUNTIME_PLUGIN_DIR}"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"$<TARGET_FILE:dts_runtime_${runtime_line}>"
"$<TARGET_BUNDLE_DIR:DateToSpine>/Contents/PlugIns/runtimes/")
"${DTS_RUNTIME_PLUGIN_DIR}/")
endforeach()
endif()
endif()