Commit 69414f14 authored by Adrian Johnson's avatar Adrian Johnson

mingw build fix - use win32 threads

The cmake FindThreads detects both win32 and pthreads on mingw.
It also attempts a TryRun test for pthreads which won't work with
a cross compile.
parent ecd2b7bf
......@@ -10,9 +10,13 @@ include(MacroOptionalFindPackage)
find_package(PkgConfig)
include(MacroEnsureVersion)
include(MacroBoolTo01)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
if (WIN32)
message("-- Using win32 threads")
else()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
endif()
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
include(CheckFileOffsetBits)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment