Skip to content

Commit 4cbe4c6

Browse files
committed
clarifications
1 parent 7944453 commit 4cbe4c6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

libmamba/CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,16 @@ macro(libmamba_create_target target_name linkage output_name)
562562
elseif(WIN32)
563563

564564
set(CMAKE_PREFIX_PATH "$ENV{VCPKG_ROOT}/installed/x64-windows-static-md/")
565-
set(ENABLE_WIN32_XMLLITE ON) # libarchive uses xmllite on windows if using libxml and
566-
# not expat
565+
566+
# TODO AND CONTEXT: We found a link error in libarchive which lacked a link to
567+
# XmlLite which is provided by Windows. libarchive has cmake
568+
# scripts doing the necessary work to link that library but for some
569+
# reason we couldnt idenfity it is not linking in this specific case
570+
# (it was before but the version changed apparently). As a workaround
571+
# we manually link with that required library but a better solution
572+
# would be to find why libarchive doesnt do it itself.
573+
set(SYSTEM_PROVIDED_LIBRARIES XmlLite.lib) # required by libarchive
574+
set(ENABLE_WIN32_XMLLITE ON)
567575

568576
# For Windows we have a vcpkg based build system right now.
569577
find_package(LibArchive MODULE REQUIRED)
@@ -584,7 +592,7 @@ macro(libmamba_create_target target_name linkage output_name)
584592
${target_name}
585593
PUBLIC
586594
${CRYPTO_LIBRARIES}
587-
XmlLite.lib # required by libarchive
595+
${SYSTEM_PROVIDED_LIBRARIES}
588596
${LibArchive_LIBRARY}
589597
${LIBXML2_LIBRARY}
590598
${ICONV_LIBRARY}

0 commit comments

Comments
 (0)