[lldb] Conditionalize target_link_libraries on the target

Fixes "Cannot specify link libraries for target "lldb-target-fuzzer"
which is not built by this project." Normally that's taken care of by
add_llvm_fuzzer but we need target_link_libraries for liblldb and our
utility library.
This commit is contained in:
Jonas Devlieghere 2022-03-25 09:47:08 -07:00
parent 5161835d5a
commit 8f7db763ef
No known key found for this signature in database
GPG Key ID: 49CC0BD90FDEED4D
1 changed files with 7 additions and 6 deletions

View File

@ -9,9 +9,10 @@ add_llvm_fuzzer(lldb-target-fuzzer
lldb-target-fuzzer.cpp
)
target_link_libraries(lldb-target-fuzzer
PRIVATE
liblldb
lldbFuzzerUtils
)
if(TARGET lldb-target-fuzzer)
target_link_libraries(lldb-target-fuzzer
PRIVATE
liblldb
lldbFuzzerUtils
)
endif()