gentoo-ebuilds/media-gfx/maim/files/maim-5.8.1-cmake-min-ver-3.10.patch
Lucio Sauer 266d32d8ed
media-gfx/maim: fix CMake < 3.10 warning
Closes: https://bugs.gentoo.org/964644
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Part-of: https://github.com/gentoo/gentoo/pull/44258
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2025-10-20 13:06:09 +02:00

41 lines
1.5 KiB
Diff

Backport upstream patch to fix deprecation warning for CMake < 3.10
introduced with CMake version 3.31.
See-also: https://github.com/naelstrof/maim/commit/ef0b35a9be1525b85f6c814f2d0156d91942c831
From: Lucio Sauer <watermanpaint@posteo.net>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required( VERSION 3.5.0 )
+cmake_minimum_required( VERSION 3.10 )
project(maim VERSION 5.8.1 LANGUAGES CXX)
@@ -67,17 +67,13 @@ target_link_libraries( ${BIN_TARGET}
${SLOP_LIBRARY}
${WEBP_LIBRARY} )
-if( ${CMAKE_VERSION} VERSION_LESS 3.7 )
- message( WARNING "CMake version is below 3.7, CMake version >= 3.7 is required for unicode support." )
-else()
- find_package(ICU COMPONENTS uc)
- set( MAIM_UNICODE TRUE CACHE BOOL "To enable or disable unicode support." )
- if ( MAIM_UNICODE AND ICU_FOUND )
- # ICU is required for old nvidia drivers to work for whatever reason.
- add_definitions(-DCXXOPTS_USE_UNICODE)
- include_directories( ${ICU_INCLUDE_DIR} )
- target_link_libraries( ${BIN_TARGET} ${ICU_UC_LIBRARIES} )
- endif()
+find_package(ICU COMPONENTS uc)
+set( MAIM_UNICODE TRUE CACHE BOOL "To enable or disable unicode support." )
+if ( MAIM_UNICODE AND ICU_FOUND )
+# ICU is required for old nvidia drivers to work for whatever reason.
+ add_definitions(-DCXXOPTS_USE_UNICODE)
+ include_directories( ${ICU_INCLUDE_DIR} )
+ target_link_libraries( ${BIN_TARGET} ${ICU_UC_LIBRARIES} )
endif()
install( TARGETS ${BIN_TARGET} DESTINATION "${CMAKE_INSTALL_BINDIR}" )
--
2.51.0