summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2022-11-29 14:40:19 +0100
committerKefu Chai <tchaikov@gmail.com>2022-11-29 14:42:26 +0100
commitc0ac7a2fc1966d76625da4e455f25dfec1422c28 (patch)
treeb67bd377e01f3c8d3e92aa1d831bf5bf83cc34d0 /cmake
parentMerge pull request #48525 from rhcs-dashboard/fix-PgImbalance-alert (diff)
downloadceph-c0ac7a2fc1966d76625da4e455f25dfec1422c28.tar.xz
ceph-c0ac7a2fc1966d76625da4e455f25dfec1422c28.zip
cmake: add c-ares::cares as a global visible library
to address the build failure like: -- Checking for one of the modules 'libcares' CMake Error at cmake/modules/BuildBoost.cmake:287 (_add_library): _add_library cannot create ALIAS target "c-ares::c-ares" because target "c-ares::cares" is imported but not globally visible. Call Stack (most recent call first): cmake/modules/Findc-ares.cmake:31 (add_library) src/CMakeLists.txt:344 (find_package) Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/Findc-ares.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/modules/Findc-ares.cmake b/cmake/modules/Findc-ares.cmake
index 1e26c5c1c0f..56311c7c3eb 100644
--- a/cmake/modules/Findc-ares.cmake
+++ b/cmake/modules/Findc-ares.cmake
@@ -22,7 +22,7 @@ find_package_handle_standard_args(c-ares
VERSION_VAR c-ares_VERSION)
if(c-ares_FOUND AND NOT (TARGET c-ares::cares))
- add_library(c-ares::cares UNKNOWN IMPORTED)
+ add_library(c-ares::cares UNKNOWN IMPORTED GLOBAL)
set_target_properties(c-ares::cares PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${c-ares_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"