message("${Y}==== 进入find_zlib.cmake ====${E}")

set(USE_ZLIB OFF)

if (DEFINED PATH_ZLIB AND NOT "${PATH_ZLIB}" STREQUAL "")
    file(TO_CMAKE_PATH ${PATH_ZLIB} PATH_ZLIB)
    if (EXISTS ${PATH_ZLIB})
        set(ZLIB_ROOT ${PATH_ZLIB})
        find_package(ZLIB CONFIG REQUIRED)
        list(APPEND CMAKE_PREFIX_PATH ${PATH_ZLIB})
        message("找到zlib库根目录,将启用ZLIB")
        set(USE_ZLIB ON)
    else ()
        message("zlib库目录配置错误,不启用zlib")
    endif ()
else ()
    message("未配置zlib根目录,不启用zlib")
endif ()


