[CMake] Include ZLIB_ROOT in LLVMConfig.cmake
authorJake Egan <Jake.Egan@ibm.com>
Thu, 6 Jan 2022 16:22:09 +0000 (11:22 -0500)
committerJake Egan <jakeegan10@gmail.com>
Thu, 6 Jan 2022 16:25:00 +0000 (11:25 -0500)
Include the value of `ZLIB_ROOT` in `LLVMConfig.cmake` so `FindZLIB` can pick it up. This fixes an issue where ZLIB is not found on AIX runtimes despite specifying `-DZLIB_ROOT`.

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D116235

llvm/cmake/modules/LLVMConfig.cmake.in

index 425d3ed..7d64aa6 100644 (file)
@@ -69,6 +69,7 @@ set(LLVM_ENABLE_UNWIND_TABLES @LLVM_ENABLE_UNWIND_TABLES@)
 
 set(LLVM_ENABLE_ZLIB @LLVM_ENABLE_ZLIB@)
 if(LLVM_ENABLE_ZLIB)
+  set(ZLIB_ROOT @ZLIB_ROOT@)
   find_package(ZLIB)
 endif()