Skip to content

Commit 5a20274

Browse files
committed
1
1 parent 7c28be1 commit 5a20274

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

cmake_modules/IcebergThirdpartyToolchain.cmake

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,18 +289,14 @@ function(resolve_cpr_dependency)
289289
ARCHIVE DESTINATION "${ICEBERG_INSTALL_LIBDIR}"
290290
LIBRARY DESTINATION "${ICEBERG_INSTALL_LIBDIR}")
291291

292-
if(TARGET libcurl)
293-
get_target_property(real_target libcurl ALIASED_TARGET)
294-
if(real_target)
295-
# libcurl 是一个别名
296-
message(FATAL_ERROR "DEBUG >>> 'libcurl' is an ALIAS for the real target: ==> ${real_target} <=="
297-
)
298-
else()
299-
# libcurl 不是别名,这不太可能发生,但以防万一
300-
message(FATAL_ERROR "DEBUG >>> 'libcurl' is a REAL target. This is unexpected.")
301-
endif()
292+
if(TARGET libcurl_static)
293+
message(STATUS "Found and installing real vendored target 'libcurl_static'.")
294+
install(TARGETS libcurl_static
295+
EXPORT iceberg_targets
296+
ARCHIVE DESTINATION "${ICEBERG_INSTALL_LIBDIR}")
302297
else()
303-
message(FATAL_ERROR "DEBUG >>> Could not find target 'libcurl'.")
298+
message(WARNING "Could not find the real vendored target 'libcurl_static' to install."
299+
)
304300
endif()
305301

306302
set(CPR_VENDORED TRUE)

0 commit comments

Comments
 (0)