From db8f54e2f94ce99c55cc3ec842ca1e233aa227e7 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Tue, 4 Jan 2022 20:31:39 -0800 Subject: [PATCH] CMake to 3.14, replaced FetchContent_GetProperties --- CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcbadc7..e325a6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) project(blah) # C++ version @@ -102,11 +102,7 @@ if (PLATFORM_SDL2) GIT_REPOSITORY https://github.com/libsdl-org/SDL GIT_TAG release-2.0.18 # grab latest stable release ) - FetchContent_GetProperties(SDL2) - if (NOT sdl2_POPULATED) - FetchContent_Populate(SDL2) - add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR}) - endif() + FetchContent_MakeAvailable(SDL2) # statically link SDL2 since we're building it ourselves set(LIBS ${LIBS} SDL2main SDL2-static)