SHA256
3
0
forked from pool/cmake
cmake/cmake-fix-png-include-dir.patch
Simon Lees 5997e9c000 Accepting request 997696 from home:polslinux:branches:devel:tools:building
- Update to 3.24.1:
  * automoc: avoid compiler warnings in linker-warning-silencing code
  * FindThreads: Skip check for -pthread flag when targeting the MSVC ABI
  * IPO: Do not use -flto=auto with GCC 10.x on Windows
  * export: Restore exclusion of private shared library dependencies from checks
  * FindVulkan: Restore tolerance of unknown FATAL_ERROR component
  * Help: Add 3.24 release note about FindVulkan component enforcement
  * TI compiler: Add support for COMPILE_WARNING_AS_ERROR target property
  * Help: List compiler IDs supported by COMPILE_WARNING_AS_ERROR
  * Help: A missing cross-reference to --compile-no-warning-as-error

OBS-URL: https://build.opensuse.org/request/show/997696
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=500
2022-08-18 11:37:43 +00:00

24 lines
947 B
Diff

Index: cmake-3.24.1/Modules/FindPNG.cmake
===================================================================
--- cmake-3.24.1.orig/Modules/FindPNG.cmake
+++ cmake-3.24.1/Modules/FindPNG.cmake
@@ -54,12 +54,16 @@ endif()
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)
mark_as_advanced(PNG_PNG_INCLUDE_DIR)
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)