Skip to content

Commit 4627836

Browse files
committed
Don't build SFML libraries that are not needed
1 parent 575b098 commit 4627836

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.22)
1+
cmake_minimum_required(VERSION 3.28)
22
project(raytracer CXX)
33

44
if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
@@ -8,7 +8,7 @@ elseif(MSVC)
88
endif()
99

1010
include(FetchContent)
11-
FetchContent_Declare(SFML GIT_REPOSITORY https://github.com/SFML/SFML.git)
11+
FetchContent_Declare(SFML GIT_REPOSITORY https://github.com/SFML/SFML.git SYSTEM EXCLUDE_FROM_ALL)
1212
FetchContent_MakeAvailable(SFML)
1313

1414
add_executable(raytracer

CMakePresets.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"CMAKE_BUILD_TYPE": "Release",
1010
"CMAKE_CXX_EXTENSIONS": "OFF",
1111
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
12-
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
13-
"SFML_BUILD_AUDIO": "OFF",
14-
"SFML_BUILD_NETWORK": "OFF"
12+
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON"
1513
}
1614
}
1715
]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SFML-based raytracer program
66

77
# Requirements
88
* C++17
9-
* CMake 3.22
9+
* CMake 3.28
1010

1111
# Building & Running
1212

0 commit comments

Comments
 (0)