Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: Enable external ZLIB from CMake variable ZLIB_ROOT #363

Open
lordjaxom opened this issue Mar 29, 2023 · 0 comments
Open

CMake: Enable external ZLIB from CMake variable ZLIB_ROOT #363

lordjaxom opened this issue Mar 29, 2023 · 0 comments

Comments

@lordjaxom
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant