forked from pool/cmake
Accepting request 795139 from home:vyermolc:root
- Add cmake-fix-png-include-dir.patch to fix the libpng include dir search. OpenSUSE uses %{_includedir}/libpng%{branch} format, so cmake can`t find it. OBS-URL: https://build.opensuse.org/request/show/795139 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=408
This commit is contained in:
parent
8d71859529
commit
f628bfd55c
22
cmake-fix-png-include-dir.patch
Normal file
22
cmake-fix-png-include-dir.patch
Normal file
@ -0,0 +1,22 @@
|
||||
Index: b/Modules/FindPNG.cmake
|
||||
===================================================================
|
||||
--- a/Modules/FindPNG.cmake
|
||||
+++ b/Modules/FindPNG.cmake
|
||||
@@ -52,11 +52,15 @@
|
||||
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)
|
||||
|
||||
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)
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 17 20:53:02 UTC 2020 - Vitaly Yermolchyk <yermolchyk@gmail.com>
|
||||
|
||||
- Add cmake-fix-png-include-dir.patch to fix the png include dir
|
||||
search.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 10 10:00:03 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
@ -54,6 +54,7 @@ Source99: README.SUSE
|
||||
Patch0: cmake-fix-ruby-test.patch
|
||||
# Search for python interpreters from newest to oldest rather then picking up /usr/bin/python as first choice
|
||||
Patch1: feature-suse-python-interp-search-order.patch
|
||||
Patch2: cmake-fix-png-include-dir.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkgconfig
|
||||
|
Loading…
Reference in New Issue
Block a user