From 96b7e4c67fb660cd239b83b728db7b368b94cae2 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Mon, 5 Feb 2024 22:21:54 +0100 Subject: [PATCH] Update libpng to 1.6.42 --- 3rdparty/libpng/CMakeLists.txt | 2 -- 3rdparty/libpng/libpng | 2 +- 3rdparty/zlib/CMakeLists.txt | 7 ++++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/3rdparty/libpng/CMakeLists.txt b/3rdparty/libpng/CMakeLists.txt index 5ff146cd84..f24c2c9709 100644 --- a/3rdparty/libpng/CMakeLists.txt +++ b/3rdparty/libpng/CMakeLists.txt @@ -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() diff --git a/3rdparty/libpng/libpng b/3rdparty/libpng/libpng index f135775ad4..35d9f5ea52 160000 --- a/3rdparty/libpng/libpng +++ b/3rdparty/libpng/libpng @@ -1 +1 @@ -Subproject commit f135775ad4e5d4408d2e12ffcc71bb36e6b48551 +Subproject commit 35d9f5ea523cb4f9d677af4705e00ddd185ed10e diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt index 7f75b85fb9..9559d12c00 100644 --- a/3rdparty/zlib/CMakeLists.txt +++ b/3rdparty/zlib/CMakeLists.txt @@ -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()