Jelajahi Sumber

Don't include pthreads code when threads are disabled

Fixes https://github.com/libsdl-org/SDL/issues/4950
Sam Lantinga 3 tahun lalu
induk
melakukan
bbac1e9add
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      cmake/sdlchecks.cmake

+ 1 - 1
cmake/sdlchecks.cmake

@@ -859,7 +859,7 @@ endmacro()
 # PTHREAD_CFLAGS
 # PTHREAD_LIBS
 macro(CheckPTHREAD)
-  if(SDL_PTHREADS)
+  if(SDL_THREADS AND SDL_PTHREADS)
     if(ANDROID)
       # the android libc provides built-in support for pthreads, so no
       # additional linking or compile flags are necessary