mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[libxml2] fix build failure with x64-linux-dynamic (#14991)
This commit is contained in:
parent
c670d13a50
commit
1d8728ae1b
@ -108,6 +108,19 @@ if(INSTALL_HEADERS)
|
|||||||
set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
|
set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBLZMA_INCLUDE_DIRS})
|
target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBLZMA_INCLUDE_DIRS})
|
||||||
|
get_property(LIBRARIES TARGET Iconv::Iconv PROPERTY INTERFACE_LINK_LIBRARIES)
|
||||||
|
if(LIBRARIES)
|
||||||
|
set_property(TARGET Iconv::Iconv PROPERTY INTERFACE_LINK_LIBRARIES "")
|
||||||
|
foreach(LIBRARY ${LIBRARIES})
|
||||||
|
# Since `libc.so` has no SONAME, CMake maps e.g. `/usr/lib/x86_64-linux-gnu/libc.so` to `-llibc`.
|
||||||
|
# This is not found: it should be mapped to `-lc`.
|
||||||
|
if(LIBRARY MATCHES "/libc\\.so$")
|
||||||
|
set_property(TARGET Iconv::Iconv APPEND PROPERTY INTERFACE_LINK_LIBRARIES "c")
|
||||||
|
else()
|
||||||
|
set_property(TARGET Iconv::Iconv APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${LIBRARY}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
target_link_libraries(libxml2 PRIVATE
|
target_link_libraries(libxml2 PRIVATE
|
||||||
Iconv::Iconv
|
Iconv::Iconv
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Source: libxml2
|
Source: libxml2
|
||||||
Version: 2.9.10
|
Version: 2.9.10
|
||||||
Port-Version: 1
|
Port-Version: 2
|
||||||
Homepage: https://xmlsoft.org/
|
Homepage: https://xmlsoft.org/
|
||||||
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
|
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
|
||||||
Build-Depends: zlib, libiconv, liblzma
|
Build-Depends: zlib, libiconv, liblzma
|
||||||
|
Loading…
x
Reference in New Issue
Block a user