Update libpng to 1.6.42

This commit is contained in:
Megamouse 2024-02-05 22:21:54 +01:00
parent 65d93c97ea
commit 96b7e4c67f
3 changed files with 5 additions and 6 deletions

View File

@ -4,11 +4,9 @@ if (NOT USE_SYSTEM_LIBPNG)
# We use libpng's static library and don't need to build the shared library and run the tests
set(PNG_SHARED OFF CACHE BOOL "Build shared lib")
set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
set(PNG_BUILD_ZLIB ON CACHE BOOL "ZLIB is already build or package is found")
set(SKIP_INSTALL_ALL ON)
add_subdirectory(libpng EXCLUDE_FROM_ALL)
target_include_directories(png_static INTERFACE "${libpng_BINARY_DIR}" "${libpng_SOURCE_DIR}")
target_link_libraries(png_static 3rdparty::zlib)
set(LIBPNG_TARGET png_static PARENT_SCOPE)
else()

@ -1 +1 @@
Subproject commit f135775ad4e5d4408d2e12ffcc71bb36e6b48551
Subproject commit 35d9f5ea523cb4f9d677af4705e00ddd185ed10e

View File

@ -1,10 +1,9 @@
if (USE_SYSTEM_ZLIB)
message(STATUS "RPCS3: Using system ZLIB")
find_package(ZLIB QUIET)
find_package(ZLIB QUIET REQUIRED)
add_library(3rdparty_zlib INTERFACE)
target_link_libraries(3rdparty_zlib INTERFACE ${ZLIB_LIBRARIES})
target_include_directories(3rdparty_zlib INTERFACE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(3rdparty_zlib INTERFACE ZLIB::ZLIB)
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
else()
message(STATUS "RPCS3: Using builtin ZLIB")
@ -15,4 +14,6 @@ else()
target_link_libraries(3rdparty_zlib INTERFACE zlibstatic)
target_include_directories(3rdparty_zlib INTERFACE zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
set(ZLIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/zlib PARENT_SCOPE)
endif()