cmake_minimum_required(VERSION 3.24)
project(hello C)

# Use an installed SDL 3.4 or later if there is one. If not, download and build it.
include(FetchContent)
FetchContent_Declare(
    SDL3
    GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
    GIT_TAG release-3.4.18
    GIT_SHALLOW TRUE
    FIND_PACKAGE_ARGS 3.4 CONFIG
)
FetchContent_MakeAvailable(SDL3)

add_executable(hello WIN32 main.c)
target_link_libraries(hello PRIVATE SDL3::SDL3)
