1*d415bd75Srobert# Link LibCURL if the user wants it
2*d415bd75Srobertif (LLVM_ENABLE_CURL)
3*d415bd75Srobert  set(imported_libs CURL::libcurl)
4*d415bd75Srobertendif()
5*d415bd75Srobert
6*d415bd75Srobert# Link cpp-httplib if the user wants it
7*d415bd75Srobertif (LLVM_ENABLE_HTTPLIB)
8*d415bd75Srobert  set(imported_libs ${imported_libs} httplib::httplib)
9*d415bd75Srobertendif()
10*d415bd75Srobert
11*d415bd75Srobert# Make sure pthread is linked if this is a unix host
12*d415bd75Srobertif (CMAKE_HOST_UNIX)
13*d415bd75Srobert  set(imported_libs ${imported_libs} ${LLVM_PTHREAD_LIB})
14*d415bd75Srobertendif()
15*d415bd75Srobert
16*d415bd75Srobert# Note: This isn't a component, since that could potentially add a libcurl
17*d415bd75Srobert# dependency to libLLVM.
18*d415bd75Srobertadd_llvm_library(LLVMDebuginfod
19*d415bd75Srobert  BuildIDFetcher.cpp
20*d415bd75Srobert  Debuginfod.cpp
21*d415bd75Srobert  HTTPClient.cpp
22*d415bd75Srobert  HTTPServer.cpp
23*d415bd75Srobert
24*d415bd75Srobert  ADDITIONAL_HEADER_DIRS
25*d415bd75Srobert  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Debuginfod
26*d415bd75Srobert
27*d415bd75Srobert  LINK_LIBS
28*d415bd75Srobert  ${imported_libs}
29*d415bd75Srobert
30*d415bd75Srobert  LINK_COMPONENTS
31*d415bd75Srobert  Support
32*d415bd75Srobert  Symbolize
33*d415bd75Srobert  DebugInfoDWARF
34*d415bd75Srobert  BinaryFormat
35*d415bd75Srobert  Object
36*d415bd75Srobert  )
37