Skip to content

Commit

Permalink
libpng: update to 1.6.46 (#2025)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit-pierre authored Jan 27, 2025
1 parent d146b9a commit fbe1149
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
11 changes: 8 additions & 3 deletions thirdparty/libpng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ list(APPEND CMAKE_ARGS
# Project options.
-DPNG_DEBUG_POSTFIX=
-DPNG_FRAMEWORK=FALSE
-DPNG_TOOLS=FALSE
-DPNG_HARDWARE_OPTIMIZATIONS=$<BOOL:${WANT_SIMD}>
-DPNG_SHARED=$<NOT:$<BOOL:${MONOLIBTIC}>>
-DPNG_STATIC=$<BOOL:${MONOLIBTIC}>
-DPNG_TESTS=FALSE
-DPNG_TOOLS=FALSE
)
# Rely on `-mfpu=neon` ifdefs for enabling NEON on 32bits ARM.
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
list(APPEND CMAKE_ARGS -DPNG_ARM_NEON=on)
endif()

list(APPEND BUILD_CMD COMMAND ninja)

Expand All @@ -20,8 +25,8 @@ if(NOT MONOLIBTIC)
endif()

external_project(
DOWNLOAD URL dabdabca28f211feeba199d93235c703
https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.43.tar.gz
DOWNLOAD URL 0b89600f84d2c5302832df4e24dfda84
https://github.com/pnggroup/libpng/archive/refs/tags/v1.6.46.tar.gz
PATCH_FILES ${PATCH_FILES}
CMAKE_ARGS ${CMAKE_ARGS}
BUILD_COMMAND ${BUILD_CMD}
Expand Down
12 changes: 7 additions & 5 deletions thirdparty/libpng/math_library.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,15 +100,12 @@ elseif(POLICY CMP0074)
endif()
endif()
@@ -116,17 +116,12 @@

find_package(ZLIB REQUIRED)

-if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU AND NOT EMSCRIPTEN)
-if(UNIX
- AND NOT (APPLE OR BEOS OR HAIKU)
- AND NOT EMSCRIPTEN)
- find_library(M_LIBRARY m)
- if(M_LIBRARY)
+include(CheckLibraryExists)
Expand All @@ -19,4 +21,4 @@
+ set(M_LIBRARY "")
endif()

# CMake currently sets CMAKE_SYSTEM_PROCESSOR to one of x86_64 or arm64 on macOS,
if(PNG_HARDWARE_OPTIMIZATIONS)

0 comments on commit fbe1149

Please sign in to comment.