summaryrefslogtreecommitdiff
path: root/media-gfx/maim/files/maim-5.8.1-cmake-min-ver-3.10.patch
blob: 19afce824cce2ccefa4ed9b22b5752809e3e3b1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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