Skip to content

Commit

Permalink
[libfmt] CMakeLists.txt: Allow CMake 3.5. (for Debian 8 ppc testing)
Browse files Browse the repository at this point in the history
VRESION_GREATER_EQUAL was added in CMake 3.7, so add a workaround for that.
  • Loading branch information
GerbilSoft committed Feb 2, 2025
1 parent 81a0126 commit 23fdcdd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion extlib/libfmt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cmake_minimum_required(VERSION 3.8...3.28)
# rom-properties: Allow CMake 3.5. (for Debian 8 ppc testing)
#cmake_minimum_required(VERSION 3.8...3.28)
cmake_minimum_required(VERSION 3.5...3.28)

# Fallback for using newer policies on CMake <3.12.
if (${CMAKE_VERSION} VERSION_LESS 3.12)
Expand Down Expand Up @@ -37,10 +39,13 @@ function(enable_module target)
endfunction()

set(FMT_USE_CMAKE_MODULES FALSE)
# rom-properties: VERSION_GREATER_EQUAL was added in CMake 3.7.
IF(CMAKE_VERSION VERSION_GREATER 3.6.99)
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.28 AND
CMAKE_GENERATOR STREQUAL "Ninja")
set(FMT_USE_CMAKE_MODULES TRUE)
endif ()
ENDIF()

# Adds a library compiled with C++20 module support.
# `enabled` is a CMake variables that specifies if modules are enabled.
Expand Down

0 comments on commit 23fdcdd

Please sign in to comment.