cmake_minimum_required(VERSION 3.10)
project(akgltest LANGUAGES C)

add_subdirectory(deps/jansson EXCLUDE_FROM_ALL)
add_subdirectory(deps/libakerror EXCLUDE_FROM_ALL)
add_subdirectory(deps/libakstdlib EXCLUDE_FROM_ALL)
add_subdirectory(deps/SDL EXCLUDE_FROM_ALL)
add_subdirectory(deps/SDL_image EXCLUDE_FROM_ALL)
add_subdirectory(deps/SDL_mixer EXCLUDE_FROM_ALL)
add_subdirectory(deps/SDL_ttf EXCLUDE_FROM_ALL)
add_subdirectory(deps/libakgl EXCLUDE_FROM_ALL)

set(prefix      ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir      "\${exec_prefix}/lib")
set(includedir  "\${prefix}/include")

# Add include directories
include_directories(${SDL3_INCLUDE_DIRS})
add_executable(akgltest src/akgltest.c)

target_link_libraries(akgltest
  PRIVATE
    akerror::akerror
    akstdlib::akstdlib
    akgl::akgl
    SDL3::SDL3
    SDL3_image::SDL3_image
    SDL3_mixer::SDL3_mixer
    SDL3_ttf::SDL3_ttf
    jansson::jansson
    -lm
)
  
