mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
CMake to 3.14, replaced FetchContent_GetProperties
This commit is contained in:
parent
91503a5520
commit
db8f54e2f9
|
@ -1,4 +1,4 @@
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
project(blah)
|
project(blah)
|
||||||
|
|
||||||
# C++ version
|
# C++ version
|
||||||
|
@ -102,11 +102,7 @@ if (PLATFORM_SDL2)
|
||||||
GIT_REPOSITORY https://github.com/libsdl-org/SDL
|
GIT_REPOSITORY https://github.com/libsdl-org/SDL
|
||||||
GIT_TAG release-2.0.18 # grab latest stable release
|
GIT_TAG release-2.0.18 # grab latest stable release
|
||||||
)
|
)
|
||||||
FetchContent_GetProperties(SDL2)
|
FetchContent_MakeAvailable(SDL2)
|
||||||
if (NOT sdl2_POPULATED)
|
|
||||||
FetchContent_Populate(SDL2)
|
|
||||||
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# statically link SDL2 since we're building it ourselves
|
# statically link SDL2 since we're building it ourselves
|
||||||
set(LIBS ${LIBS} SDL2main SDL2-static)
|
set(LIBS ${LIBS} SDL2main SDL2-static)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user