zlib needs to be found (with vcpkg in CI), do not use our bundled copy

This commit is contained in:
Benjamin Sergeant
2020-07-06 18:08:53 -07:00
parent d6366587a0
commit 4789e190a0
257 changed files with 7 additions and 76214 deletions

View File

@ -201,18 +201,9 @@ if (USE_TLS)
endif()
endif()
# This ZLIB_FOUND check is to help find a cmake manually configured zlib
if (NOT ZLIB_FOUND)
find_package(ZLIB)
endif()
if (ZLIB_FOUND)
include_directories(${ZLIB_INCLUDE_DIRS})
target_link_libraries(ixwebsocket ${ZLIB_LIBRARIES})
else()
include_directories(third_party/zlib ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib)
add_subdirectory(third_party/zlib)
target_link_libraries(ixwebsocket zlibstatic)
endif()
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
target_link_libraries(ixwebsocket ${ZLIB_LIBRARIES})
if (WIN32)
target_link_libraries(ixwebsocket wsock32 ws2_32 shlwapi)