Browse Source

libpng: fix compilation with ccache

It seems an extra CMake variable is needed for one of the scripts.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 5 years ago
parent
commit
7a01a09fe7
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
2 changed files with 20 additions and 1 deletions
  1. +1
    -1
      libs/libpng/Makefile
  2. +19
    -0
      libs/libpng/patches/200-ccache.patch

+ 1
- 1
libs/libpng/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libpng
PKG_VERSION:=1.6.37
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@SF/libpng


+ 19
- 0
libs/libpng/patches/200-ccache.patch View File

@ -0,0 +1,19 @@
--- a/scripts/genout.cmake.in
+++ b/scripts/genout.cmake.in
@@ -14,6 +14,7 @@ set(BINDIR "@CMAKE_CURRENT_BINARY_DIR@")
set(AWK "@AWK@")
set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
+set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
set(CMAKE_C_FLAGS @CMAKE_C_FLAGS@)
set(INCDIR "@CMAKE_CURRENT_BINARY_DIR@")
set(PNG_PREFIX "@PNG_PREFIX@")
@@ -58,7 +59,7 @@ if ("${INPUTEXT}" STREQUAL ".c" AND "${OUTPUTEXT}" STREQUAL ".out")
set(PNG_PREFIX_DEF "-DPNG_PREFIX=${PNG_PREFIX}")
endif()
- execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E"
+ execute_process(COMMAND "${CMAKE_C_COMPILER}" ${CMAKE_C_COMPILER_ARG1} "-E"
${CMAKE_C_FLAGS}
${PLATFORM_C_FLAGS}
"-I${SRCDIR}"

Loading…
Cancel
Save