if(UNIX AND NOT APPLE)
    find_package(SDL2 REQUIRED)
else()
    set(SDL_SHARED_ENABLED_BY_DEFAULT
        OFF
        CACHE BOOL "" FORCE)
    set(SDL_LIBC
        ON
        CACHE BOOL "" FORCE)
    add_subdirectory(${CMAKE_SOURCE_DIR}/JEngine/vendor/SDL)
endif()

set(SPDLOG_NO_EXCEPTIONS
    ON
    CACHE BOOL "" FORCE)
if(ENABLE_PCH)
    set(SPDLOG_ENABLE_PCH
        ON
        CACHE BOOL "" FORCE)
else()
    set(SPDLOG_ENABLE_PCH
        OFF
        CACHE BOOL "" FORCE)
endif()
add_subdirectory(${CMAKE_SOURCE_DIR}/JEngine/vendor/spdlog)
target_compile_definitions(spdlog PUBLIC "FMT_EXCEPTIONS=0")
