hyporo-cpp/source/creator/cmake/mingw-pre-pack.cmake.in
2023-03-13 22:31:11 +05:00

12 lines
374 B
CMake
Executable File

execute_process(
COMMAND ldd "@CPACK_PACKAGE_DIRECTORY@/@PROJECT_NAME@.exe"
COMMAND grep "mingw"
COMMAND cut "-d" " " "-f" "3"
COMMAND xargs "cp" "-t" "@CMAKE_INSTALL_BINDIR@"
RESULT_VARIABLE EXIT_CODE
)
if(NOT EXIT_CODE EQUAL 0)
message(STATUS "Running pre-build command failed with exit code ${EXIT_CODE}.")
endif()