From 8ac25e67ddd2fa38eca322d691c1c3a45fa6a24d Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Fri, 28 Jul 2017 16:13:39 +0200 Subject: [PATCH] Copy the libwinpthread-1.dll to the bin dir --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49f826b..966604b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,6 +157,14 @@ install (DIRECTORY resources/sound DESTINATION share/planetblupi) install (DIRECTORY resources/music DESTINATION share/planetblupi) install (FILES resources/icon/planetblupi.png DESTINATION share/planetblupi) +# Copy libwinpthread-1.dll which seems not be linkable statically +if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND MINGW) + execute_process (COMMAND cygpath.exe --windows /mingw64 OUTPUT_VARIABLE MINGW64_PATH) + string (REGEX REPLACE "[ \t\n\r]+$" "" MINGW64_PATH "${MINGW64_PATH}") + string (REGEX REPLACE "[\\]" "\\\\\\\\" MINGW64_PATH "${MINGW64_PATH}") + install (FILES "${MINGW64_PATH}\\\\bin\\\\libwinpthread-1.dll" DESTINATION bin) +endif () + ######### ## Deploy #########