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")
|
2024-02-05 22:21:54 +01:00
|
|
|
find_package(ZLIB QUIET REQUIRED)
|
2023-07-11 20:40:30 +02:00
|
|
|
|
|
|
|
add_library(3rdparty_zlib INTERFACE)
|
2024-02-05 22:21:54 +01:00
|
|
|
target_link_libraries(3rdparty_zlib INTERFACE ZLIB::ZLIB)
|
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()
|
2024-05-02 13:53:18 +02:00
|
|
|
option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" OFF)
|
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()
|