cmake_minimum_required(VERSION 3.20)

project(tetoris C)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

include(FetchContent)

FetchContent_Declare(
  jag_parse
  GIT_REPOSITORY https://git.jaglekon.de/jag/jagParse_c
  GIT_TAG v1.1.2
)

FetchContent_MakeAvailable(jag_parse)

add_executable(tetoris
  source/main.c
  source/draw.c
  source/logic.c
)

target_link_libraries(tetoris PRIVATE jag_parse)

target_compile_options(tetoris PRIVATE
    $<$<CONFIG:Debug>:-Wall -Wextra -Wpedantic>
)

