mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
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:
+3
-3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user