Skip to content

Meson: Cleanup and fix libxml2 dep search #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

fanc999-1
Copy link
Contributor

@fanc999-1 fanc999-1 commented Jul 5, 2023

Hi,

This attempts to clean up the Visual Studio parts of the Meson build files by letting CMake help finding libxml2 (which does a more comprehensive version of using %INCLUDE% and %LIB% so that we don't have to reinvent wheels), and consolidate the libxml2 search in a single dependency() call as this is supported since Meson 0.60.0 and later.

Also update the libxml2 CMake subproject by using CMake to find ICU and liblzma in the same manner, and work a bit harder to ensure that we have the correct libxml2 .lib in the resulting pkg-config file for libxml++, by using CMake's info where applicable, before falling back to the plain LibXml2.lib.

With blessings, thank you!

Use CMake to help us find libxml2, in addition to using pkg-config, as
CMake actually looks up libxml2 for us using the headers in %INCLUDE%
and the libraries in %LIB% in a more comprehensive way, so we don't need
to reinvent the wheel.

Since we use Meson 0.60.0 or later, we can use the CMake libxml2
dependency name together with libxml-2.0.pc to find libxml2 in one
single call.

Also update the libxml2 CMake subproject by using CMake to find ICU and
liblzma in the same manner, and ensure that we have the correct
libxml2 .lib in the resulting pkg-config file for libxml++.
@kjellahl kjellahl merged commit 36c2b34 into libxmlplusplus:master Jul 5, 2023
@fanc999-1 fanc999-1 deleted the meson-cleanup-msvc branch July 6, 2023 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants