cmake_minimum_required(VERSION 3.28)
project(bvolley)

set(CMAKE_CXX_STANDARD 20)

file(GLOB_RECURSE SOURCES "src/*.cpp")
file(GLOB_RECURSE HEADERS "src/*.h")

add_executable(bvolley ${SOURCES} ${HEADERS})

# raylib options
set(BUILD_EXAMPLES OFF CACHE BOOL "Build raylib examples")

# configure raylib
add_subdirectory(vendor/raylib)
target_link_libraries(bvolley raylib)
target_include_directories(bvolley PRIVATE vendor/raylib/src)

# configure box2d
add_subdirectory(vendor/box2d)
target_link_libraries(bvolley box2d)
target_include_directories(bvolley PRIVATE vendor/box2d/include)

# copy assets to the build directory
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR})