Skip to content

Commit deb8c03

Browse files
committed
Exclude SFML from the All target, and flag as a system library, closes #6
1 parent 1faab78 commit deb8c03

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
cmake_minimum_required(VERSION 3.16)
1+
cmake_minimum_required(VERSION 3.28)
22
project(CMakeSFMLProject LANGUAGES CXX)
33

44
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
55
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
66

77
include(FetchContent)
8-
FetchContent_Declare(SFML
8+
FetchContent_Declare(sfml
99
GIT_REPOSITORY https://github.com/SFML/SFML.git
10-
GIT_TAG 2.6.x)
11-
FetchContent_MakeAvailable(SFML)
10+
GIT_TAG 2.6.x
11+
EXCLUDE_FROM_ALL
12+
SYSTEM)
13+
FetchContent_MakeAvailable(sfml)
1214

1315
add_executable(CMakeSFMLProject src/main.cpp)
1416
target_link_libraries(CMakeSFMLProject PRIVATE sfml-graphics)

0 commit comments

Comments
 (0)