From df5fa5d3e276dc099943258a824cada1183fa1ac Mon Sep 17 00:00:00 2001 From: Oleksandr Kalko Date: Mon, 12 May 2025 10:54:58 +0300 Subject: [PATCH] Update CMakeLists.txt to compile with CMake 4.0 * CMake support for 3.5 or lower was removed in 4.0 * FetchContent_Populate was deprecated and removed in 4.0, use FetchContent_MakeAvailable Fixes #87 --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8055f91..69d0203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.30) project(torch) include(FetchContent) @@ -43,7 +43,7 @@ if(USE_STANDALONE) FetchContent_GetProperties(libgfxd) if(NOT libgfxd_POPULATED) - FetchContent_Populate(libgfxd) + FetchContent_MakeAvailable(libgfxd) include_directories(${libgfxd_SOURCE_DIR}) set(LGFXD_SRC gfxd.c uc_f3d.c uc_f3db.c uc_f3dex.c uc_f3dexb.c uc_f3dex2.c) foreach (LGFXD_FILE ${LGFXD_SRC}) @@ -247,4 +247,4 @@ if(NOT USE_STANDALONE) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/lib) target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) target_include_directories(${PROJECT_NAME} PUBLIC ${yaml-cpp_SOURCE_DIR}/include) -endif() \ No newline at end of file +endif()