Skip to content

CMake: Enable external ZLIB from CMake variable ZLIB_ROOT #363

@lordjaxom

Description

@lordjaxom

We build Blosc from scratch using CMake's ExternalProject and would like to use an external ZLIB.

Since our goal is to have as many projects build closely to CMake standards, we would like to provide -DZLIB_ROOT when configuring Blosc and have find_package(ZLIB) pick up $ZLIB_ROOT/.../ZLIBConfig.cmake. Currently this is prevented because Blosc's CMakeLists.txt replaces ZLIB_ROOT with $ENV{ZLIB_ROOT}. Sadly we can't set environment variables with ExternalProject's CMake build feature. The attached patch only replaces ZLIB_ROOT if it is not already defined.

blosc-1.21.3-z1.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions