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()