CMake to 3.14, replaced FetchContent_GetProperties

This commit is contained in:
Noel Berry 2022-01-04 20:31:39 -08:00 committed by GitHub
parent 91503a5520
commit db8f54e2f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)