Link against `dl` and `dld` only when `LIBXML2_WITH_MODULES` is enabled
dl
(or dld
) seem to be referenced from xmlmodule.c
only, which is built only if LIBXML_MODULES_ENABLED
is defined.
But currently dl
(or dld
) is linked to libxml2
target unconditionally which results in injecting a redundant dependency.
In order to prevent not needed libraries from being linked to libxml2
, link dl(or
dld) to the
libxml2target only if
LIBXML2_WITH_MODULES` feature is explicitly enabled.