Commit b5cb2162 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use all interface include dirs needed for LibXml2 (unbreak Windows build)

LIBXML2_INCLUDE_DIRS instead of LIBXML2_INCLUDE_DIR has all the needed
include dirs also of other libraries in the public interface.
iconv.h as used by libxml/encoding.h was not found on Windows due to that.

As CMake 3.16 is the min required version meanwhile, also resolve the
existing TODO and switch to the imported target LibXml2::LibXml2,
which has the DIRS variant set in the link interface property.
parent 189fe645
Pipeline #132444 skipped
......@@ -8,8 +8,6 @@ set_package_properties(LibXml2 PROPERTIES
if (LIBXML2_FOUND)
add_definitions(-DHAVE_LIBXML2)
# TODO: Use LibXml2::LibXml2 when we'll require CMake >= 3.12
include_directories(${LIBXML2_INCLUDE_DIR})
endif ()
if (BUILD_TESTING)
......@@ -63,8 +61,10 @@ PUBLIC
Qt::Xml
PRIVATE
KF5::I18n
${LIBXML2_LIBRARIES}
)
if (LIBXML2_FOUND)
target_link_libraries(KF5AkonadiXml PRIVATE LibXml2::LibXml2)
endif()
set_target_properties(KF5AkonadiXml PROPERTIES
VERSION ${AKONADI_VERSION}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment