[PATCH] D115189: [Support] [Debuginfod] Include curl include dirs when curl is enabled. (WIP)
Noah Shutty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 6 15:08:27 PST 2021
noajshu updated this revision to Diff 392198.
noajshu added a comment.
Add block for importing curl with llvm-config.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115189/new/
https://reviews.llvm.org/D115189
Files:
llvm/lib/Support/CMakeLists.txt
Index: llvm/lib/Support/CMakeLists.txt
===================================================================
--- llvm/lib/Support/CMakeLists.txt
+++ llvm/lib/Support/CMakeLists.txt
@@ -76,7 +76,7 @@
# Link LibCURL if the user wants it
if (LLVM_ENABLE_CURL)
- set(system_libs ${system_libs} ${CURL_LIBRARIES})
+ set(imported_libs ${imported_libs} CURL::libcurl)
endif()
# Override the C runtime allocator on Windows and embed it into LLVM tools & libraries
@@ -294,6 +294,21 @@
set(llvm_system_libs ${llvm_system_libs} "${terminfo_library}")
endif()
+# This block is only needed for llvm-config. When we deprecate llvm-config and
+# move to using CMake export, this block can be removed.
+if(LLVM_ENABLE_CURL)
+ # CMAKE_BUILD_TYPE is only meaningful to single-configuration generators.
+ if(CMAKE_BUILD_TYPE)
+ string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
+ get_property(curl_library TARGET CURL::libcurl PROPERTY LOCATION_${build_type})
+ endif()
+ if(NOT curl_library)
+ get_property(curl_library TARGET CURL::libcurl PROPERTY LOCATION)
+ endif()
+ get_library_name(${curl_library} curl_library)
+ set(llvm_system_libs ${llvm_system_libs} "${curl_library}")
+endif()
+
set_property(TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS "${llvm_system_libs}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115189.392198.patch
Type: text/x-patch
Size: 1288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211206/5150278c/attachment.bin>
More information about the llvm-commits
mailing list