Files
VoidLoaderCore/cmake/bundle_windows.cmake
T
faumaray 6527ef9d69
VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit
trying to migrate
Signed-off-by: Faumaray <faumaray@gmail.com>
2025-10-19 02:59:05 +03:00

25 lines
642 B
CMake

# Copy referenced DLLs using objdump
execute_process(
COMMAND objdump -p ${INPUT_LIB}
OUTPUT_VARIABLE OBJDUMP_OUT
)
string(REGEX MATCHALL "DLL Name: ([A-Za-z0-9_\\.-]+)" DLLS "${OBJDUMP_OUT}")
set(MINGW_ROOTS
"/usr/x86_64-w64-mingw32/bin"
"/usr/lib/gcc/x86_64-w64-mingw32/"
)
foreach(DLL ${DLLS})
string(REGEX REPLACE "DLL Name: " "" DLL_NAME ${DLL})
foreach(ROOT ${MINGW_ROOTS})
file(GLOB CAND "${ROOT}/${DLL_NAME}")
if (CAND)
message(STATUS "📦 Copying ${CAND}")
file(COPY ${CAND} DESTINATION ${OUT_DIR})
break()
endif()
endforeach()
endforeach()