Skip to content

Commit 7c28be1

Browse files
committed
1
1 parent 152b059 commit 7c28be1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

cmake_modules/IcebergThirdpartyToolchain.cmake

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,12 +290,17 @@ function(resolve_cpr_dependency)
290290
LIBRARY DESTINATION "${ICEBERG_INSTALL_LIBDIR}")
291291

292292
if(TARGET libcurl)
293-
message(STATUS "Found vendored target 'libcurl', installing it.")
294-
install(TARGETS libcurl
295-
EXPORT iceberg_targets
296-
ARCHIVE DESTINATION "${ICEBERG_INSTALL_LIBDIR}")
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()
297302
else()
298-
message(WARNING "Could not find vendored target 'libcurl' to install.")
303+
message(FATAL_ERROR "DEBUG >>> Could not find target 'libcurl'.")
299304
endif()
300305

301306
set(CPR_VENDORED TRUE)

0 commit comments

Comments
 (0)