From 3880174a9f04dcb9fe67c20b2186070085023c7e Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 4 Mar 2021 18:40:56 +0300 Subject: [PATCH] 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 --- CMakeLists.txt | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a134ce3a4..a237a8b48 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 "")