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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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 "")