<commit_before>PROJECT(TESArena CXX)

SET(OpenTESArena_VERSION "0.6.0")

FIND_PACKAGE(SDL2 REQUIRED)
FIND_PACKAGE(OpenAL REQUIRED)
FIND_PACKAGE(WildMidi)

SET(EXTERNAL_LIBS ${OPENAL_LIBRARY} ${SDL2_LIBRARY})
INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR}" ${SDL2_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR})
IF(WILDMIDI_FOUND)
    SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${WILDMIDI_LIBRARIES})
    INCLUDE_DIRECTORIES(${WILDMIDI_INCLUDE_DIRS})
    ADD_DEFINITIONS("-DHAVE_WILDMIDI=1")
ELSE(WILDMIDI_FOUND)
    MESSAGE(STATUS "WildMidi not found, no MIDI support!")
ENDIF(WILDMIDI_FOUND)

SET(SRC_ROOT ${TESArena_SOURCE_DIR})

FILE(GLOB_RECURSE TES_ASSETS
    ${SRC_ROOT}/src/Assets/*.h* 
    ${SRC_ROOT}/src/Assets/*.c*)

FILE(GLOB_RECURSE TES_ENTITIES
    ${SRC_ROOT}/src/Entities/*.h* 
    ${SRC_ROOT}/src/Entities/*.c*)

FILE(GLOB_RECURSE TES_GAME
    ${SRC_ROOT}/src/Game/*.h* 
    ${SRC_ROOT}/src/Game/*.c*)

FILE(GLOB_RECURSE TES_INTERFACE
    ${SRC_ROOT}/src/Interface/*.h* 
    ${SRC_ROOT}/src/Interface/*.c*)

FILE(GLOB_RECURSE TES_ITEMS
    ${SRC_ROOT}/src/Items/*.h* 
    ${SRC_ROOT}/src/Items/*.c*)

FILE(GLOB_RECURSE TES_MATH
    ${SRC_ROOT}/src/Math/*.h* 
    ${SRC_ROOT}/src/Math/*.c*)

FILE(GLOB_RECURSE TES_MEDIA
    ${SRC_ROOT}/src/Media/*.h* 
    ${SRC_ROOT}/src/Media/*.c*)

FILE(GLOB_RECURSE TES_RENDERING
    ${SRC_ROOT}/src/Rendering/*.h* 
    ${SRC_ROOT}/src/Rendering/*.c*)

FILE(GLOB_RECURSE TES_UTILITIES
    ${SRC_ROOT}/src/Utilities/*.h* 
    ${SRC_ROOT}/src/Utilities/*.c*)

FILE(GLOB_RECURSE TES_WORLD
    ${SRC_ROOT}/src/World/*.h* 
    ${SRC_ROOT}/src/World/*.c*)

SET(TES_MAIN ${SRC_ROOT}/src/Main.cpp)

SET(TES_RESOURCES ${CMAKE_SOURCE_DIR}/windows/opentesarena.rc)

SET(TES_SOURCES 
    ${TES_ASSETS}
    ${TES_ENTITIES}
    ${TES_GAME}
    ${TES_INTERFACE}
    ${TES_ITEMS}
    ${TES_MATH}
    ${TES_MEDIA}
    ${TES_RENDERING}
    ${TES_UTILITIES}
    ${TES_WORLD}
    ${TES_MAIN})

SET(TES_DATA_FOLDER ${CMAKE_SOURCE_DIR}/data)
SET(TES_OPTIONS_FOLDER ${CMAKE_SOURCE_DIR}/options)

IF (NOT APPLE)
    LIST(APPEND TES_SOURCES ${TES_RESOURCES})
    ADD_DEFINITIONS("-D_SCL_SECURE_NO_WARNINGS=1")

    # Copy over required files
    FILE(COPY ${TES_DATA_FOLDER} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
    FILE(COPY ${TES_OPTIONS_FOLDER} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})<commit_msg>Separating Windows-only code from Not-Apple code<commit_after>PROJECT(TESArena CXX)

SET(OpenTESArena_VERSION "0.6.0")

FIND_PACKAGE(SDL2 REQUIRED)
FIND_PACKAGE(OpenAL REQUIRED)
FIND_PACKAGE(WildMidi)

SET(EXTERNAL_LIBS ${OPENAL_LIBRARY} ${SDL2_LIBRARY})
INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR}" ${SDL2_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR})
IF(WILDMIDI_FOUND)
    SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${WILDMIDI_LIBRARIES})
    INCLUDE_DIRECTORIES(${WILDMIDI_INCLUDE_DIRS})
    ADD_DEFINITIONS("-DHAVE_WILDMIDI=1")
ELSE(WILDMIDI_FOUND)
    MESSAGE(STATUS "WildMidi not found, no MIDI support!")
ENDIF(WILDMIDI_FOUND)

SET(SRC_ROOT ${TESArena_SOURCE_DIR})

FILE(GLOB_RECURSE TES_ASSETS
    ${SRC_ROOT}/src/Assets/*.h* 
    ${SRC_ROOT}/src/Assets/*.c*)

FILE(GLOB_RECURSE TES_ENTITIES
    ${SRC_ROOT}/src/Entities/*.h* 
    ${SRC_ROOT}/src/Entities/*.c*)

FILE(GLOB_RECURSE TES_GAME
    ${SRC_ROOT}/src/Game/*.h* 
    ${SRC_ROOT}/src/Game/*.c*)

FILE(GLOB_RECURSE TES_INTERFACE
    ${SRC_ROOT}/src/Interface/*.h* 
    ${SRC_ROOT}/src/Interface/*.c*)

FILE(GLOB_RECURSE TES_ITEMS
    ${SRC_ROOT}/src/Items/*.h* 
    ${SRC_ROOT}/src/Items/*.c*)

FILE(GLOB_RECURSE TES_MATH
    ${SRC_ROOT}/src/Math/*.h* 
    ${SRC_ROOT}/src/Math/*.c*)

FILE(GLOB_RECURSE TES_MEDIA
    ${SRC_ROOT}/src/Media/*.h* 
    ${SRC_ROOT}/src/Media/*.c*)

FILE(GLOB_RECURSE TES_RENDERING
    ${SRC_ROOT}/src/Rendering/*.h* 
    ${SRC_ROOT}/src/Rendering/*.c*)

FILE(GLOB_RECURSE TES_UTILITIES
    ${SRC_ROOT}/src/Utilities/*.h* 
    ${SRC_ROOT}/src/Utilities/*.c*)

FILE(GLOB_RECURSE TES_WORLD
    ${SRC_ROOT}/src/World/*.h* 
    ${SRC_ROOT}/src/World/*.c*)

SET(TES_MAIN ${SRC_ROOT}/src/Main.cpp)

SET(TES_RESOURCES ${CMAKE_SOURCE_DIR}/windows/opentesarena.rc)

SET(TES_SOURCES 
    ${TES_ASSETS}
    ${TES_ENTITIES}
    ${TES_GAME}
    ${TES_INTERFACE}
    ${TES_ITEMS}
    ${TES_MATH}
    ${TES_MEDIA}
    ${TES_RENDERING}
    ${TES_UTILITIES}
    ${TES_WORLD}
    ${TES_MAIN})

SET(TES_DATA_FOLDER ${CMAKE_SOURCE_DIR}/data)
SET(TES_OPTIONS_FOLDER ${CMAKE_SOURCE_DIR}/options)

IF (WIN32)
    LIST(APPEND TES_SOURCES $(TES_RESOURCES))
    ADD_DEFINITIONS("-D_SCL_SECURE_NO_WARNINGS=1")
ENDIF()

IF (NOT APPLE)
    # Copy over required files
    FILE(COPY ${TES_DATA_FOLDER} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
    FILE(COPY ${TES_OPTIONS_FOLDER} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
{'fraction_non_alphanumeric': 0.1585261353898886, 'fraction_numerical': 0.0038560411311053984, 'mean_word_length': 4.82896379525593, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1752032', 'n_tokens_mistral': 2151, 'n_tokens_neox': 2023, 'n_words': 231}