From 92b5da4524b933cb533193d66691bc28208bcd84 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Thu, 7 Jun 2018 21:56:13 +0200 Subject: [PATCH 1/2] Fix linking with winpthread Closes issue #24. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6123cc91..46848cf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,6 +103,7 @@ if (MINGW) # Remove cmd window when executing planetblupi set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mwindows") + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive") endif (MINGW) # Dependencies From 22929d69225b5893a9d34a7d9e7d297ddae6f9a6 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Thu, 7 Jun 2018 21:58:56 +0200 Subject: [PATCH 2/2] Do not deploy winpthread anymore --- CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46848cf5..8aa5c62a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -283,14 +283,6 @@ if (NOT USE_APPIMAGE) ) endif () -# Copy libwinpthread-1.dll which seems not be linkable statically -if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND MINGW) - execute_process (COMMAND cygpath.exe --windows $ENV{MINGW_PREFIX} OUTPUT_VARIABLE MINGW_PATH) - string (REGEX REPLACE "[ \t\n\r]+$" "" MINGW_PATH "${MINGW_PATH}") - string (REGEX REPLACE "[\\]" "\\\\\\\\" MINGW_PATH "${MINGW_PATH}") - install (FILES "${MINGW_PATH}\\\\bin\\\\libwinpthread-1.dll" DESTINATION bin) -endif () - ######### ## Deploy #########