From cba78b92a5d5a8931c334de2e28e8c83db8e8631 Mon Sep 17 00:00:00 2001 From: Jonny Paton Date: Mon, 5 Aug 2024 11:51:19 +0100 Subject: [PATCH] Exclude SFML from the All target, and flag as a system library --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b586b7..0cf460b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -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) @@ -8,7 +8,9 @@ include(FetchContent) FetchContent_Declare(SFML GIT_REPOSITORY https://github.com/SFML/SFML.git GIT_TAG 2.6.x - GIT_SHALLOW ON) + GIT_SHALLOW ON + EXCLUDE_FROM_ALL + SYSTEM) FetchContent_MakeAvailable(SFML) add_executable(main src/main.cpp)