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
This commit is contained in:
Ozkan Sezer 2021-03-04 18:40:56 +03:00
parent 05cc9e3764
commit 3880174a9f

View file

@ -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 "")