38 lines
883 B
CMake
38 lines
883 B
CMake
cmake_minimum_required(VERSION 3.16)
|
|
project(FarmFighter)
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
if(POLICY CMP0077)
|
|
cmake_policy(SET CMP0077 NEW)
|
|
endif()
|
|
set(FETCHCONTENT_QUIET OFF)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
raylib
|
|
URL https://github.com/raysan5/raylib/archive/refs/tags/4.5.0.tar.gz
|
|
)
|
|
FetchContent_MakeAvailable(raylib)
|
|
|
|
# Avoid building the examples and games from raylib
|
|
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
|
set(BUILD_GAMES OFF CACHE BOOL "" FORCE)
|
|
|
|
FetchContent_Declare(
|
|
enet
|
|
URL https://github.com/zpl-c/enet/archive/refs/tags/v2.3.10.zip
|
|
)
|
|
FetchContent_MakeAvailable(enet)
|
|
|
|
add_library(enet INTERFACE)
|
|
target_include_directories(enet INTERFACE ${enet_SOURCE_DIR}/include)
|
|
|
|
add_subdirectory(networking)
|
|
add_subdirectory(engine)
|
|
add_subdirectory(client)
|
|
add_subdirectory(server)
|