cmake_minimum_required(VERSION 3.2...3.29)
project(rlgldemo)

# Adding Raylib
include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
#set raylib settings
add_compile_definitions(SUPPORT_FILEFORMAT_JPG)

FetchContent_Declare(
    raylib
    GIT_REPOSITORY "https://github.com/raysan5/raylib.git"
    GIT_TAG "master"
    GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(raylib)
set_target_properties(raylib PROPERTIES FOLDER examples/deps)
set_target_properties(glfw PROPERTIES FOLDER examples/deps)
set_target_properties(update_mappings PROPERTIES FOLDER examples/deps)

include_directories(${filehandler_SOURCE_DIR})
include_directories(${libvitaboy_SOURCE_DIR})

# Adding our source files
set(RLGL_DEMO_SOURCES main.cpp)

# Declaring our executable
add_executable(rlgldemo ${RLGL_DEMO_SOURCES})
target_link_libraries(rlgldemo PRIVATE raylib libvitaboy FileHandler)

set_target_properties(rlgldemo PROPERTIES FOLDER examples)
