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
This commit is contained in:
Oleksandr Kalko
2025-05-13 16:28:57 -06:00
committed by Lywx
parent 8e56ea0294
commit df5fa5d3e2
+3 -3
View File
@@ -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()
endif()