diff --git a/CMakeLists.txt b/CMakeLists.txt index f3321f9..b1cb53e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,17 +4,17 @@ project(mandelbrot CXX) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) +include(FetchContent) +set(SFML_BUILD_NETWORK OFF) +FetchContent_Declare(SFML GIT_REPOSITORY https://github.com/SFML/SFML.git) +FetchContent_MakeAvailable(SFML) + if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") add_compile_options(-ffast-math -Werror -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Wsign-conversion -Wold-style-cast) elseif(MSVC) add_compile_options(/WX /W4 /permissive-) endif() -include(FetchContent) -set(SFML_BUILD_NETWORK OFF) -FetchContent_Declare(SFML GIT_REPOSITORY https://github.com/SFML/SFML.git GIT_TAG ae87def93e7b0280b5826b0fa5e1a8ef7156e9e7) -FetchContent_MakeAvailable(SFML) - add_executable(mandelbrot src/Mandelbrot.cpp) target_link_libraries(mandelbrot PRIVATE SFML::Graphics SFML::Audio Threads::Threads)