[lldb][CMake] Fix linking of gdb-remote when LLVM_ENABLE_ZLIB is ON
authorMariusz Ceier <mceier+llvm@gmail.com>
Tue, 8 Feb 2022 07:26:22 +0000 (23:26 -0800)
committerFangrui Song <i@maskray.me>
Tue, 8 Feb 2022 07:26:22 +0000 (23:26 -0800)
commit385f5c4d33799df25a85ceb54b6232499cb8a78d
tree2e1025da606f6ee2f6f00a00db824022f0911828
parent42ac4e1a120c0d0784365c2c7f39c87854b507c4
[lldb][CMake] Fix linking of gdb-remote when LLVM_ENABLE_ZLIB is ON

When LLVM_ENABLE_ZLIB is ON gdb-remote should link against ZLIB::ZLIB.

This fixes
```
/mnt/b/yoe/master/build/tmp/hosttools/ld: lib/liblldbPluginProcessGDBRemote.a(GDBRemoteCommunication.cpp.o): in function `lldb_private::process_gdb_remote::GDBRemoteCommunication::DecompressPacket() [clone .localalias]':
GDBRemoteCommunication.cpp:(.text._ZN12lldb_private18process_gdb_remote22GDBRemoteCommunication16DecompressPacketEv+0x59a): undefined reference to `inflateInit2_'
/mnt/b/yoe/master/build/tmp/hosttools/ld: GDBRemoteCommunication.cpp:(.text._ZN12lldb_private18process_gdb_remote22GDBRemoteCommunication16DecompressPacketEv+0x5af): undefined reference to `inflate'
```

Reviewed By: JDevlieghere, MaskRay

Differential Revision: https://reviews.llvm.org/D119186
lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt