MinGW: Better pthread names order

This commit is contained in:
deve 2015-03-03 07:17:48 +01:00
parent 89d5cee4c1
commit 26054a1c60

View File

@ -278,7 +278,7 @@ else()
if(MSVC)
set(PTHREAD_NAMES pthreadVC2)
elseif(MINGW)
set(PTHREAD_NAMES "winpthread-1" "pthreadGC2" "libwinpthread-1")
set(PTHREAD_NAMES "winpthread-1" "libwinpthread-1" "pthreadGC2")
endif()
find_library(PTHREAD_LIBRARY NAMES pthread ${PTHREAD_NAMES} PATHS ${PROJECT_SOURCE_DIR}/dependencies/lib)
mark_as_advanced(PTHREAD_LIBRARY)
@ -392,7 +392,7 @@ if(MINGW)
if(LIBOPENMP)
file(COPY ${LIBOPENMP} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
endif()
find_library(LIBPTHREAD NAMES "winpthread-1.dll" "pthreadGC2.dll" "libwinpthread-1.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
find_library(LIBPTHREAD NAMES "winpthread-1.dll" "libwinpthread-1.dll" "pthreadGC2.dll" PATHS ${CMAKE_FIND_ROOT_PATH})
if(LIBPTHREAD)
file(COPY ${LIBPTHREAD} DESTINATION ${CMAKE_BINARY_DIR}/bin/)
endif()