cmake_minimum_required(VERSION 3.16)
project(SDL3_Tilemap)

# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
file(GLOB ASSETS "assets/*")

file(COPY ${ASSETS} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/assets)

find_package(SDL3 REQUIRED)
find_package(SDL3_image REQUIRED)

file(GLOB SOURCES "src/*.cpp" "src/*.hpp")

add_executable(SDL3_Tilemap ${SOURCES})

target_include_directories(SDL3_Tilemap PRIVATE ${CMAKE_SOURCE_DIR}/rapidjson/include)
target_link_libraries(SDL3_Tilemap PRIVATE SDL3::SDL3 SDL3_image::SDL3_image)
