File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff 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} " )
You can’t perform that action at this time.
0 commit comments