Skip to content

Commit 3880174

Browse files
committed
CMake: set OPT_DEF_LIBC to ON for clang case, too.
from a patchset by Vladislav Dmitrievich Turbanov: #4062
1 parent 05cc9e3 commit 3880174

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,6 @@ else()
159159
set(SDL_PTHREADS_ENABLED_BY_DEFAULT OFF)
160160
endif()
161161

162-
# Default option knobs
163-
if(APPLE OR ARCH_64)
164-
if(NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm")
165-
set(OPT_DEF_SSEMATH ON)
166-
endif()
167-
endif()
168-
if(UNIX OR MINGW OR MSYS)
169-
set(OPT_DEF_LIBC ON)
170-
endif()
171-
172162
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
173163
# so we'll just use libusb when it's available. libusb does not support iOS,
174164
# so we default to yes on iOS.
@@ -208,6 +198,16 @@ if(USE_GCC OR USE_CLANG)
208198
set(OPT_DEF_GCC_ATOMICS ON)
209199
endif()
210200

201+
# Default option knobs
202+
if(APPLE OR ARCH_64)
203+
if(NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "arm")
204+
set(OPT_DEF_SSEMATH ON)
205+
endif()
206+
endif()
207+
if(UNIX OR MINGW OR MSYS OR USE_CLANG)
208+
set(OPT_DEF_LIBC ON)
209+
endif()
210+
211211
# Default flags, if not set otherwise
212212
if("$ENV{CFLAGS}" STREQUAL "")
213213
if(CMAKE_BUILD_TYPE STREQUAL "")

0 commit comments

Comments
 (0)