Skip to content

Commit

Permalink
Exclude SFML from the All target, and flag as a system library, closes
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyPtn committed Aug 5, 2024
1 parent 1faab78 commit deb8c03
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit deb8c03

Please sign in to comment.