Skip to content

Commit

Permalink
build: Set cmake_minimum_required to version 3.30 (#7709)
Browse files Browse the repository at this point in the history
* build: Set cmake_minimum_required to version 3.30

* Nix: add patch for CMake min ver

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
  • Loading branch information
davc0n and fufexan authored Sep 10, 2024
1 parent 8237d7e commit c67b257
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.27)
cmake_minimum_required(VERSION 3.30)

# Get version
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
Expand Down
10 changes: 10 additions & 0 deletions nix/cmake-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6fdf98db..d8424d91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.30)
+cmake_minimum_required(VERSION 3.27)

# Get version
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
2 changes: 2 additions & 0 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
patches = [
# forces GCC to use -std=c++26
./stdcxx.patch
# Nix does not have CMake 3.30 yet, so override the minimum version
./cmake-version.patch
];

postPatch = ''
Expand Down

0 comments on commit c67b257

Please sign in to comment.