Skip to content

Commit d139516

Browse files
committed
1
1 parent 06dc680 commit d139516

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cmake_modules/IcebergThirdpartyToolchain.cmake

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,6 @@ function(resolve_cpr_dependency)
264264
ON
265265
CACHE BOOL "" FORCE)
266266

267-
set(CURL_INSTALL
268-
OFF
269-
CACHE BOOL "" FORCE)
270-
271267
set(USE_LIBIDN2
272268
OFF
273269
CACHE BOOL "" FORCE)
@@ -294,7 +290,14 @@ function(resolve_cpr_dependency)
294290
LIBRARY DESTINATION "${ICEBERG_INSTALL_LIBDIR}")
295291

296292
if(TARGET libcurl_static)
297-
message(STATUS "Found and installing real vendored target 'libcurl_static'.")
293+
# 步骤 1: 为 libcurl_static 设置一个唯一的导出名称,避免与系统库冲突
294+
# 我们将其导出为 iceberg_libcurl_static
295+
set_target_properties(libcurl_static PROPERTIES EXPORT_NAME iceberg_libcurl_static)
296+
297+
# 步骤 2: 仍然安装原始的 libcurl_static 目标
298+
# CMake 在导出时会自动使用我们在上面设置的 EXPORT_NAME
299+
message(STATUS "Found vendored target 'libcurl_static', installing it with unique export name 'iceberg_libcurl_static'."
300+
)
298301
install(TARGETS libcurl_static
299302
EXPORT iceberg_targets
300303
ARCHIVE DESTINATION "${ICEBERG_INSTALL_LIBDIR}")

0 commit comments

Comments
 (0)