lower required cmake version

This commit is contained in:
theo3 2022-01-20 20:18:47 -08:00
parent 79d8d25be2
commit 3f266d91a6
2 changed files with 22 additions and 4 deletions

View File

@ -178,8 +178,7 @@ tools: $(GFX)
$(GFX) $(AIF) $(MID) $(SCANINC) $(PREPROC) $(FIX) $(ASSET_PROCESSOR) tools/bin/agb2mid tools/bin/tmc_strings tools/bin/bin2c &:
mkdir -p tools/cmake-build
unset CC CXX AS LD LDFLAGS && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=tools -S tools -B tools/cmake-build
cmake --build tools/cmake-build -j
cmake --install tools/cmake-build
cmake --build tools/cmake-build -j --target install
# Automatically extract binary data
build/extracted_assets_%: $(ASSET_CONFIGS) $(TRANSLATIONS)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.13)
project(tools)
include(FetchContent)
@ -31,7 +31,26 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/CLIUtils/CLI11
GIT_TAG v2.1.2
)
if (${CMAKE_VERSION} VERSION_LESS "3.14")
FetchContent_GetProperties(json)
FetchContent_GetProperties(fmt)
FetchContent_GetProperties(cli11)
if (NOT json_POPULATED)
FetchContent_Populate(json)
add_subdirectory(${json_SOURCE_DIR} ${json_BINARY_DIR})
endif()
if (NOT fmt_POPULATED)
FetchContent_Populate(fmt)
add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
endif()
if (NOT cli11_POPULATED)
FetchContent_Populate(cli11)
add_subdirectory(${cli11_SOURCE_DIR} ${cli11_BINARY_DIR})
endif()
else()
FetchContent_MakeAvailable(json fmt cli11)
endif()
add_library(filesystem INTERFACE)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")