cmake_minimum_required(VERSION 3.20)
project(hang_man)

set(CMAKE_CXX_STANDARD 20)

if (NOT DEFINED CMAKE_TOOLCHAIN_FILE)
    set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
endif ()

find_package(SDL2 CONFIG REQUIRED)
find_package(SDL2_ttf CONFIG REQUIRED)
find_package(CURL REQUIRED)

add_executable(hang_man src/main.cpp
        src/Game.cpp
        src/Game.hpp
        src/State.hpp
        src/words.hpp
        src/words.cpp
        src/utils.hpp
        src/GuessCorrector.cpp
        src/GuessCorrector.hpp
        src/default_font.cpp
        src/default_font.hpp
)

target_link_libraries(hang_man PRIVATE
        SDL2::SDL2
        SDL2::SDL2main
        SDL2_ttf::SDL2_ttf
        CURL::libcurl
)
