From 030a21e80b485d033fbd2efd760c8a6c9167286b Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 17 Apr 2025 21:48:11 +0300 Subject: [PATCH] upgrade minimum cmake to 3.10 & remove copy_directory_if_different available only since 3.26 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6966e81fd..fb53ddece 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) project(VoxelEngine) set(CMAKE_CXX_STANDARD 17) @@ -37,6 +37,10 @@ target_link_libraries(VoxelEngine PRIVATE VoxelEngineSrc target_link_options(VoxelEngine PRIVATE $<$:-no-pie>) # Deploy res to build dir +if(NOT EXISTS $/res) + file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/res DESTINATION $/res) +endif() + add_custom_command( TARGET VoxelEngine POST_BUILD