diff --git a/CMakeLists.txt b/CMakeLists.txt index 8398e55e..2acde3c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,16 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.28) project(CMakeSFMLProject LANGUAGES CXX) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) option(BUILD_SHARED_LIBS "Build shared libraries" OFF) include(FetchContent) -FetchContent_Declare(SFML +FetchContent_Declare(sfml GIT_REPOSITORY https://github.com/SFML/SFML.git - GIT_TAG 2.6.x) -FetchContent_MakeAvailable(SFML) + GIT_TAG 2.6.x + EXCLUDE_FROM_ALL + SYSTEM) +FetchContent_MakeAvailable(sfml) add_executable(CMakeSFMLProject src/main.cpp) target_link_libraries(CMakeSFMLProject PRIVATE sfml-graphics)