Commit 3880174a9f04dcb9fe67c20b2186070085023c7e

Ozkan Sezer 2021-03-04T18:40:56

CMake: set OPT_DEF_LIBC to ON for clang case, too. from a patchset by Vladislav Dmitrievich Turbanov: https://github.com/libsdl-org/SDL/pull/4062

diff --git a/CMakeLists.txt b/CMakeLists.txt
index a134ce3..a237a8b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,16 +159,6 @@ else()
   set(SDL_PTHREADS_ENABLED_BY_DEFAULT OFF)
 endif()
 
-# Default option knobs
-if(APPLE OR ARCH_64)
-  if(NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm")
-    set(OPT_DEF_SSEMATH ON)
-  endif()
-endif()
-if(UNIX OR MINGW OR MSYS)
-  set(OPT_DEF_LIBC ON)
-endif()
-
 # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
 #  so we'll just use libusb when it's available. libusb does not support iOS,
 #  so we default to yes on iOS.
@@ -208,6 +198,16 @@ if(USE_GCC OR USE_CLANG)
   set(OPT_DEF_GCC_ATOMICS ON)
 endif()
 
+# Default option knobs
+if(APPLE OR ARCH_64)
+  if(NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm")
+    set(OPT_DEF_SSEMATH ON)
+  endif()
+endif()
+if(UNIX OR MINGW OR MSYS OR USE_CLANG)
+  set(OPT_DEF_LIBC ON)
+endif()
+
 # Default flags, if not set otherwise
 if("$ENV{CFLAGS}" STREQUAL "")
   if(CMAKE_BUILD_TYPE STREQUAL "")