<commit_before># Define target name
set (TARGET_NAME SDL)

# Define source files
file (GLOB C_FILES
    src/*.c src/atomic/*.c src/audio/*.c src/audio/dummy/*.c src/cpuinfo/*.c src/events/*.c src/file/*.c src/joystick/*.c src/libm/*.c src/stdlib/*.c src/thread/*.c src/timer/*.c src/video/*.c src/video/dummy/*.c
)

if (WIN32)
    file (GLOB SYS_C_FILES
        src/audio/directsound/*.c src/joystick/windows/*.c src/core/windows/*.c src/loadso/windows/*.c src/thread/windows/*.c src/timer/windows/*.c src/video/windows/*.c
    )
elseif (IOS)
    file (GLOB SYS_C_FILES
        src/audio/coreaudio/*.c src/file/cocoa/*.m src/joystick/iphoneos/*.m src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/uikit/*.m src/video/uikit/*.c
    )
elseif (APPLE)
    file (GLOB SYS_C_FILES
        src/audio/coreaudio/*.c src/joystick/darwin/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/cocoa/*.m
    )
else ()
    include(CheckCSourceCompiles)

    # On Linux, make sure development libraries exist, and use their include file directories  
    find_package (OpenGL REQUIRED)
    find_package (X11 REQUIRED)
    if (NOT X11_Xrandr_FOUND)
        message (FATAL_ERROR "Could not find XRandR (libxrandr-dev)")
    endif ()
    find_package (ALSA REQUIRED)

    include_directories (${OpenGL_INCLUDE_DIRS})
    include_directories (${X11_INCLUDE_DIRS})  
    include_directories (${ALSA_INCLUDE_DIRS})

    set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
    check_c_source_compiles("
        #include <X11/Xlib.h>
        #include <X11/Xproto.h>
        #include <X11/extensions/Xext.h>
        #include <X11/extensions/extutil.h>
        extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
        int main(int argc, char **argv) {}" HAVE_CONST_XEXT_ADDDISPLAY)
    if(HAVE_CONST_XEXT_ADDDISPLAY)
        add_definitions (-DSDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY)
    endif(HAVE_CONST_XEXT_ADDDISPLAY)
    set(CMAKE_REQUIRED_LIBRARIES)

    file (GLOB SYS_C_FILES
        src/audio/alsa/*.c src/audio/dma/*.c src/audio/dsp/*.c src/joystick/linux/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/x11/*.c
    )
endif ()

file (GLOB H_FILES include/*.h)
<commit_msg>Formatting.<commit_after># Define target name
set (TARGET_NAME SDL)

# Define source files
file (GLOB C_FILES
    src/*.c src/atomic/*.c src/audio/*.c src/audio/dummy/*.c src/cpuinfo/*.c src/events/*.c src/file/*.c src/joystick/*.c src/libm/*.c src/stdlib/*.c src/thread/*.c src/timer/*.c src/video/*.c src/video/dummy/*.c
)

if (WIN32)
    file (GLOB SYS_C_FILES
        src/audio/directsound/*.c src/joystick/windows/*.c src/core/windows/*.c src/loadso/windows/*.c src/thread/windows/*.c src/timer/windows/*.c src/video/windows/*.c
    )
elseif (IOS)
    file (GLOB SYS_C_FILES
        src/audio/coreaudio/*.c src/file/cocoa/*.m src/joystick/iphoneos/*.m src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/uikit/*.m src/video/uikit/*.c
    )
elseif (APPLE)
    file (GLOB SYS_C_FILES
        src/audio/coreaudio/*.c src/joystick/darwin/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/cocoa/*.m
    )
else ()
    include(CheckCSourceCompiles)

    # On Linux, make sure development libraries exist, and use their include file directories  
    find_package (OpenGL REQUIRED)
    find_package (X11 REQUIRED)
    if (NOT X11_Xrandr_FOUND)
        message (FATAL_ERROR "Could not find XRandR (libxrandr-dev)")
    endif ()
    find_package (ALSA REQUIRED)

    include_directories (${OpenGL_INCLUDE_DIRS})
    include_directories (${X11_INCLUDE_DIRS})  
    include_directories (${ALSA_INCLUDE_DIRS})

    set(CMAKE_REQUIRED_LIBRARIES ${X11_LIB} ${X11_LIB})
    check_c_source_compiles("
        #include <X11/Xlib.h>
        #include <X11/Xproto.h>
        #include <X11/extensions/Xext.h>
        #include <X11/extensions/extutil.h>
        extern XExtDisplayInfo* XextAddDisplay(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f);
        int main(int argc, char **argv) {}" HAVE_CONST_XEXT_ADDDISPLAY)
    if (HAVE_CONST_XEXT_ADDDISPLAY)
        add_definitions (-DSDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY)
    endif ()
    set(CMAKE_REQUIRED_LIBRARIES)

    file (GLOB SYS_C_FILES
        src/audio/alsa/*.c src/audio/dma/*.c src/audio/dsp/*.c src/joystick/linux/*.c src/loadso/dlopen/*.c src/thread/pthread/*.c src/timer/unix/*.c src/video/x11/*.c
    )
endif ()

file (GLOB H_FILES include/*.h)

{'fraction_non_alphanumeric': 0.14518229166666666, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 3.2518450184501844, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6512980', 'n_tokens_mistral': 1877, 'n_tokens_neox': 1771, 'n_words': 307}