[PATCH] D79219: [CMake] Simplify CMake handling for zlib
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 16:06:03 PDT 2020
phosek added a comment.
In D79219#2201109 <https://reviews.llvm.org/D79219#2201109>, @lxfind wrote:
> @phosek, Under this change, now when I build LLVM (with a basic config `cmake -G Ninja --LLVM_ENABLE_PROJECTS=clang ../llvm`), in file `build_dir/lib/cmake/llvm/LLVMExports.cmake`, I see this:
>
> set_target_properties(LLVMSupport PROPERTIES
> INTERFACE_LINK_LIBRARIES "curses;m;ZLIB::ZLIB;LLVMDemangle"
>
> This seems broken to me. Can you take a look?
This is correct. That target is provided by `find_package(ZLIB)`. In LLVMConfig.cmake, we invoke `find_package(ZLIB)` when zlib support is enabled. If you're using `LLVMExports.cmake`, you'll need to invoke `find_package(ZLIB)` yourself.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79219/new/
https://reviews.llvm.org/D79219
More information about the cfe-commits
mailing list