2021-06-02 07:33:50 +02:00
|
|
|
if (USE_SYSTEM_ZLIB)
|
2023-07-11 20:40:30 +02: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})
|
2023-10-12 01:21:35 +02:00
|
|
|
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
|
2021-06-02 07:33:50 +02:00
|
|
|
else()
|
2023-07-11 20:40:30 +02:00
|
|
|
message(STATUS "RPCS3: Using builtin ZLIB")
|
2021-06-02 07:33:50 +02:00
|
|
|
set(SKIP_INSTALL_ALL ON)
|
|
|
|
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
|
|
|
|
2023-07-11 20:40:30 +02: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)
|
2023-10-12 01:21:35 +02:00
|
|
|
target_compile_definitions(3rdparty_zlib INTERFACE -DZLIB_CONST=1)
|
2023-07-11 20:40:30 +02:00
|
|
|
endif()
|