• Meng-Hsiu Chiang's avatar
    MDEV-29955: Set path for zlib library with pkg-config · 55cb2c29
    Meng-Hsiu Chiang authored
    `FindZLIB` module uses variable `ZLIB_ROOT`[1] to look for libraries. By
    setting the variable, `FindZLIB` is able to search the libraries that
    installed in a non-system path (/workspace/mylib for example).
    
    And when using `z` in `LINK_LIBRARIES()` CMake tries to lookup the
    library in system path by default. It doesn't work if the library isn't
    installed in the path, and use ${ZLIB_LIBRARY} which set by FindZLIB
    solve the issue.
    
    All new code of the whole pull request, including one or several files
    that are either new files or modified ones, are contributed under the
    BSD-new license. I am contributing on behalf of my employer Amazon Web
    Services.
    
    [1]: https://cmake.org/cmake/help/latest/module/FindZLIB.html#hints
    55cb2c29
zlib.cmake 2.42 KB