2021-06-02 05:33:50 +00:00
|
|
|
if (USE_SYSTEM_ZLIB)
|
2023-07-11 18:40:30 +00:00
|
|
|
message(STATUS "RPCS3: Using system ZLIB")
|
|
|
|
find_package(ZLIB QUIET)
|
|
|
|
|
|
|
|
add_library(3rdparty_zlib INTERFACE)
|
|
|
|
target_link_libraries(3rdparty_zlib INTERFACE ${ZLIB_LIBRARIES})
|
|
|
|
target_include_directories(3rdparty_zlib INTERFACE ${ZLIB_INCLUDE_DIRS})
|
2021-06-02 05:33:50 +00:00
|
|
|
else()
|
2023-07-11 18:40:30 +00:00
|
|
|
message(STATUS "RPCS3: Using builtin ZLIB")
|
2021-06-02 05:33:50 +00:00
|
|
|
set(SKIP_INSTALL_ALL ON)
|
|
|
|
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
|
|
|
|
2023-07-11 18:40:30 +00:00
|
|
|
add_library(3rdparty_zlib INTERFACE)
|
|
|
|
target_link_libraries(3rdparty_zlib INTERFACE zlibstatic)
|
|
|
|
target_include_directories(3rdparty_zlib INTERFACE zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib)
|
|
|
|
endif()
|