Bundle winpthread runtime with build outputs

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-27 21:04:38 +08:00
parent cce87868ed
commit 74cb184c03
3 changed files with 18 additions and 3 deletions
+8
View File
@@ -88,3 +88,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release")
"-s"
)
endif()
if(MINGW)
add_custom_command(TARGET version POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
/usr/x86_64-w64-mingw32/bin/libwinpthread-1.dll
$<TARGET_FILE_DIR:version>/libwinpthread-1.dll
)
endif()