mirror of
https://github.com/dylanbenzi/pacmen-sfml.git
synced 2026-11-27 00:17:01 +00:00
26 lines
747 B
CMake
26 lines
747 B
CMake
cmake_minimum_required(VERSION 3.28)
|
|
project(CMakeSFMLProject LANGUAGES CXX)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(SFML
|
|
GIT_REPOSITORY https://github.com/SFML/SFML.git
|
|
GIT_TAG 3.0.2
|
|
GIT_SHALLOW ON
|
|
EXCLUDE_FROM_ALL
|
|
SYSTEM)
|
|
|
|
FetchContent_Declare(json
|
|
GIT_REPOSITORY https://github.com/nlohmann/json.git
|
|
GIT_TAG v3.11.3
|
|
GIT_SHALLOW ON
|
|
EXCLUDE_FROM_ALL
|
|
SYSTEM)
|
|
|
|
FetchContent_MakeAvailable(SFML json)
|
|
|
|
add_executable(main src/main.cpp src/Entity.cpp src/Game.cpp src/MazeMap.cpp src/ResourceManager.cpp)
|
|
target_compile_features(main PRIVATE cxx_std_17)
|
|
target_link_libraries(main PRIVATE SFML::Graphics SFML::Audio nlohmann_json::nlohmann_json)
|