cmake_minimum_required(VERSION 3.1)

find_package(SDL2 REQUIRED)
find_package(SDL2_ttf REQUIRED)

set(SDL2_LIBS ${SDL2_LIBRARIES} ${SDL2_TTF_LIBRARY})
set(SDL2_INCDIR ${SDL2_INCLUDE_DIR} ${SDL2_TTF_INCLUDE_DIR})

file(GLOB_RECURSE TDE_SOURCES *.c)
file(GLOB_RECURSE TDE_HEADERS include/*.h)

add_executable(3dengine)
target_include_directories(3dengine PUBLIC include/)
target_sources(3dengine PRIVATE ${TDE_SOURCES} ${TDE_HEADERS})
target_include_directories(3dengine PUBLIC ${SDL2_INCDIR})
target_link_libraries(3dengine ${SDL2_LIBS} uPNG)
