diff --git a/cmake/FindZLIB.cmake b/cmake/FindZLIB.cmake deleted file mode 100644 index b12f75efad..0000000000 --- a/cmake/FindZLIB.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# Try to find the ZLIB library -# ZLIB_FOUND - system has ZLIB -# ZLIB_INCLUDE_DIR - the ZLIB include directory -# ZLIB_LIBRARY - the ZLIB library - -FIND_PATH(ZLIB_INCLUDE_DIR NAMES zlib.h) -SET(_ZLIB_STATIC_LIBS libz.a libzlib.a zlib1.a) -SET(_ZLIB_SHARED_LIBS libz.dll.a zdll zlib zlib1 z) -IF(USE_STATIC_LIBS) - FIND_LIBRARY(ZLIB_LIBRARY NAMES ${_ZLIB_STATIC_LIBS} ${_ZLIB_SHARED_LIBS}) -ELSE() - FIND_LIBRARY(ZLIB_LIBRARY NAMES ${_ZLIB_SHARED_LIBS} ${_ZLIB_STATIC_LIBS}) -ENDIF() -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR) -MARK_AS_ADVANCED(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e033c00a33..118082dcbd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -182,7 +182,6 @@ add_definitions(-D"BUILD_REVISION=\\\"${BUILD_REVISION}\\\"") # ***************************************************************************** find_package(OpenSSL QUIET) find_package(PhysFS REQUIRED) -find_package(ZLIB REQUIRED) find_package(Protobuf REQUIRED) find_package(LibLZMA REQUIRED) find_package(nlohmann_json REQUIRED) @@ -190,6 +189,8 @@ find_package(asio REQUIRED) find_package(Threads REQUIRED) find_package(STDUUID CONFIG REQUIRED) find_package(pugixml CONFIG REQUIRED) +find_package(ZLIB REQUIRED) +find_package(libzip CONFIG REQUIRED) if(APPLE) # Required for Physfs find_library(FOUNDATION Foundation REQUIRED) @@ -465,6 +466,8 @@ if(MSVC) LibLZMA::LibLZMA winmm.lib pugixml::pugixml + ZLIB::ZLIB + libzip::zip ) elseif(ANDROID) target_include_directories(${PROJECT_NAME} @@ -486,7 +489,6 @@ elseif(ANDROID) ${LUA_LIBRARY} ${LUAJIT_LIBRARY} ${PHYSFS_LIBRARY} - ${ZLIB_LIBRARY} ${PROTOBUF_LIBRARY} ${NLOHMANN_JSON_LIBRARY} ${EGL_LIBRARY} @@ -527,7 +529,6 @@ else() PRIVATE ${LUAJIT_LIBRARY} ${PHYSFS_LIBRARY} - ${ZLIB_LIBRARY} ${PROTOBUF_LIBRARY} ${NLOHMANN_JSON_LIBRARY} ${GLEW_LIBRARY}