2022-08-02 11:12:12 +02:00
|
|
|
Index: cmake-3.23.3/Modules/FindPNG.cmake
|
2020-04-18 08:51:17 +02:00
|
|
|
===================================================================
|
2022-08-02 11:12:12 +02:00
|
|
|
--- cmake-3.23.3.orig/Modules/FindPNG.cmake
|
|
|
|
+++ cmake-3.23.3/Modules/FindPNG.cmake
|
|
|
|
@@ -54,12 +54,16 @@ endif()
|
2020-04-18 08:51:17 +02:00
|
|
|
find_package(ZLIB ${_FIND_ZLIB_ARG})
|
|
|
|
|
|
|
|
if(ZLIB_FOUND)
|
|
|
|
- find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng)
|
|
|
|
+ set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
|
|
|
|
+ foreach(v IN LISTS _PNG_VERSION_SUFFIXES)
|
|
|
|
+ list(APPEND _PNG_INCLUDE_SUFFIXES libpng${v})
|
|
|
|
+ endforeach()
|
|
|
|
+ find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng ${_PNG_INCLUDE_SUFFIXES})
|
|
|
|
+ unset(_PNG_INCLUDE_SUFFIXES)
|
2021-03-24 08:59:14 +01:00
|
|
|
mark_as_advanced(PNG_PNG_INCLUDE_DIR)
|
2020-04-18 08:51:17 +02:00
|
|
|
|
|
|
|
list(APPEND PNG_NAMES png libpng)
|
|
|
|
unset(PNG_NAMES_DEBUG)
|
|
|
|
- set(_PNG_VERSION_SUFFIXES 17 16 15 14 12)
|
|
|
|
if (PNG_FIND_VERSION MATCHES "^([0-9]+)\\.([0-9]+)(\\..*)?$")
|
|
|
|
set(_PNG_VERSION_SUFFIX_MIN "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
|
|
|
|
if (PNG_FIND_VERSION_EXACT)
|