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. --HG-- extra : rebase_source : 5d08d93237484694560279ab925eeafdce55e68f
This commit is contained in:
parent
7034592ed9
commit
d1a6464741
1 changed files with 4 additions and 1 deletions
|
@ -856,7 +856,10 @@ endmacro()
|
|||
# PTHREAD_LIBS
|
||||
macro(CheckPTHREAD)
|
||||
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_LDFLAGS "-pthread")
|
||||
elseif(ANDROID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue