mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-28 14:23:18 +00:00
Port libpngdec to libpng (#1555)
* intial try to include libpng * fixing libpng cmake * cleanup structs and error codes * building libpng , destroying pkg ;/ * fixed pkg with zlib_comp mode * attemp to fix ci * rewrote png encoder with libpng * small corrections * clang fix * clang-fix? * take alpha value from decode parameters * more cleanup * fix stride calculation * libpng: avoid unnecessary allocation in decoding * libpng: interlaced support * libpng: lowered log level * revert wrong merge --------- Co-authored-by: Vinicius Rangel <me@viniciusrangel.dev>
This commit is contained in:
parent
8f2d71d458
commit
8c9d7d1a08
8 changed files with 257 additions and 117 deletions
13
externals/CMakeLists.txt
vendored
13
externals/CMakeLists.txt
vendored
|
@ -58,8 +58,10 @@ if (NOT TARGET zlib-ng::zlib)
|
|||
set(WITH_GTEST OFF)
|
||||
set(WITH_NEW_STRATEGIES ON)
|
||||
set(WITH_NATIVE_INSTRUCTIONS ON)
|
||||
set(ZLIB_COMPAT ON CACHE BOOL "" FORCE)
|
||||
add_subdirectory(zlib-ng)
|
||||
add_library(zlib-ng::zlib ALIAS zlib)
|
||||
add_library(ZLIB::ZLIB ALIAS zlib)
|
||||
endif()
|
||||
|
||||
# SDL3
|
||||
|
@ -153,6 +155,17 @@ if (NOT TARGET half::half)
|
|||
add_library(half::half ALIAS half)
|
||||
endif()
|
||||
|
||||
# libpng
|
||||
set(PNG_SHARED OFF CACHE BOOL "" FORCE)
|
||||
set(PNG_STATIC ON CACHE BOOL "" FORCE)
|
||||
set(PNG_TESTS OFF CACHE BOOL "" FORCE)
|
||||
set(PNG_TOOLS OFF CACHE BOOL "" FORCE)
|
||||
set(SKIP_INSTALL_ALL OFF CACHE BOOL "" FORCE)
|
||||
set(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng" CACHE STRING "" FORCE)
|
||||
set(ZLIB_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/zlib-ng/zlibstatic-ngd" CACHE STRING "" FORCE)
|
||||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng/zlib.h" "#include \"../zlib-ng/zlib.h\"")
|
||||
add_subdirectory(libpng)
|
||||
|
||||
if (APPLE)
|
||||
# date
|
||||
if (NOT TARGET date::date-tz)
|
||||
|
|
1
externals/libpng
vendored
Submodule
1
externals/libpng
vendored
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit c1cc0f3f4c3d4abd11ca68c59446a29ff6f95003
|
Loading…
Add table
Add a link
Reference in a new issue