mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-25 09:17:12 +01:00
cmake: Don't link directly against a libpthread on Android (thanks, Anthony!).
Android has pthreads, but it's just part of their C runtime instead of a separate library like the usual Linux platforms. Fixes Bugzilla #3675.
This commit is contained in:
parent
2b5a5c510b
commit
1b8117be21
@ -856,7 +856,10 @@ endmacro()
|
|||||||
# PTHREAD_LIBS
|
# PTHREAD_LIBS
|
||||||
macro(CheckPTHREAD)
|
macro(CheckPTHREAD)
|
||||||
if(PTHREADS)
|
if(PTHREADS)
|
||||||
if(LINUX)
|
if(ANDROID)
|
||||||
|
# the android libc provides built-in support for pthreads, so no
|
||||||
|
# additional linking or compile flags are necessary
|
||||||
|
elseif(LINUX)
|
||||||
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
set(PTHREAD_CFLAGS "-D_REENTRANT")
|
||||||
set(PTHREAD_LDFLAGS "-pthread")
|
set(PTHREAD_LDFLAGS "-pthread")
|
||||||
elseif(ANDROID)
|
elseif(ANDROID)
|
||||||
|
Loading…
Reference in New Issue
Block a user