From 3688d68d1089f75eb3a9781a4f7e8b81ecda1f7f Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Fri, 1 Dec 2017 13:51:37 +0100 Subject: [PATCH] Find the right libwinpthread according to the mingw prefix It fixes the case of 32 bit builds. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e261087..cc1db3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,10 +281,10 @@ 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 /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) + 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 () #########