Skip to content

Fix build failure with CMake >= 4.0#50

Open
mityu wants to merge 3 commits intobenikabocha:masterfrom
mityu:cmake-min-req
Open

Fix build failure with CMake >= 4.0#50
mityu wants to merge 3 commits intobenikabocha:masterfrom
mityu:cmake-min-req

Conversation

@mityu
Copy link
Copy Markdown

@mityu mityu commented May 20, 2025

CMake 4.0 dropped backward compatibility for CMake < 3.5, therefore this library can't build with CMake 4.0 or later.
(cf: https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features)

This PR updates CMakeLists.txt and some submodule libraries (glfw and glslang) to fix it.

Reproduce steps

Environment

  • macOS Sequoia 15.4.1
  • CMake 4.0.2 (installed with Homebrew)

Executed commands

git clone https://github.com/benikabocha/saba
cd saba
mkdir build
cd build
cmake ..

Output:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

mityu added 3 commits May 20, 2025 11:18
CMake 4.0 dropped backward compatibility for CMake < 3.5, therefore this
library couldn't build with CMake 4.0 or later.
cf: https://cmake.org/cmake/help/latest/release/4.0.html#deprecated-and-removed-features
Update glfw and glslang to the latest version.
@mityu
Copy link
Copy Markdown
Author

mityu commented Jun 21, 2025

@benikabocha How do you think of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant