Skip to content

build failure with cmake 4 #134

@0-wiz-0

Description

@0-wiz-0

cmake 4 deprecated support for versions < 3.5.
This causes the build to break with:

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.

The fix is to increase the minimal required version number in CMakeLists.txt:

--- CMakeLists.txt.orig 2025-08-14 08:21:38.449707889 +0000
+++ CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.5)
 project(libebur128 C)

 option(BUILD_SHARED_LIBS

and test/CMakeLists.txt:

$NetBSD$

--- test/CMakeLists.txt.orig    2025-08-14 08:22:36.261329563 +0000
+++ test/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+cmake_minimum_required(VERSION 3.5)

 set(ENABLE_TESTS OFF CACHE BOOL "Build test binaries, needs libsndfile")
 set(ENABLE_FUZZER OFF CACHE BOOL "Build fuzzer binary")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions