diff options
| -rw-r--r-- | ports/libxml2/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | ports/libxml2/CONTROL | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 323f64c34..bdc3939bf 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -108,6 +108,19 @@ if(INSTALL_HEADERS) set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") endif() 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 Iconv::Iconv ZLIB::ZLIB diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index 462ecfec6..fe8dec589 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,6 +1,6 @@ Source: libxml2 Version: 2.9.10 -Port-Version: 1 +Port-Version: 2 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) Build-Depends: zlib, libiconv, liblzma |
