cmake: Don't link directly against a libpthread on Android (thanks, Anthony!).
authorRyan C. Gordon
Wed, 09 Aug 2017 19:50:18 -0400
changeset 112083d59240ebfd9
parent 11207 4ed2e42b7497
child 11209 1374cc1666db
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.
cmake/sdlchecks.cmake
     1.1 --- a/cmake/sdlchecks.cmake	Thu Jun 08 22:07:55 2017 +0300
     1.2 +++ b/cmake/sdlchecks.cmake	Wed Aug 09 19:50:18 2017 -0400
     1.3 @@ -856,7 +856,10 @@
     1.4  # PTHREAD_LIBS
     1.5  macro(CheckPTHREAD)
     1.6    if(PTHREADS)
     1.7 -    if(LINUX)
     1.8 +    if(ANDROID)
     1.9 +      # the android libc provides built-in support for pthreads, so no
    1.10 +      # additional linking or compile flags are necessary
    1.11 +    elseif(LINUX)
    1.12        set(PTHREAD_CFLAGS "-D_REENTRANT")
    1.13        set(PTHREAD_LDFLAGS "-pthread")
    1.14      elseif(ANDROID)