Skip to content

meson: Backport libxml2 CMake support (for libxml++-4-0) #55

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

Conversation

fanc999-1
Copy link
Contributor

Hi,

This MR attempts to backport CMake support for finding/building libxml2, from the master/libxml++-5-0 branches, where:

  • We supersede searching for libxml2 manually on Windows by using CMake, which actually does the original manual search in a more comprehensive way on Windows, so we don't need to reinvent wheels here.
  • We also add support for Windows to build libxml2 as a subproject using CMake.
  • Since we are using Meson 0.55.x or later, we needed to call dependency(...) two times for dependencies that have different naming schemes, such as libxml2 and ICU.

With blessings, thank you!

This is the backport of the CMake support for libxml2, where:

* We use CMake to look for libxml2 as well, if it is not found by
  pkg-config, on Windows. It actually does what the existing method
  does for Visual Studio builds, i.e. look for the libxml2 headers
  and libraries in %INCLUDE% and %LIB% respectively, so no need to
  reinvent the wheels here.  This accomodates usage on Meson 0.55.x.
* Add support to build libxml2 as a subproject using CMake on Windows,
  like what we do for the master/libxml++-5-0 branches.
@fanc999-1 fanc999-1 changed the title meson: Backport libxml2 CMake support meson: Backport libxml2 CMake support (for libxml++-4-0) Jul 5, 2023
@kjellahl kjellahl merged commit 015308b into libxmlplusplus:libxml++-4-0 Jul 5, 2023
@fanc999-1 fanc999-1 deleted the backport-cmake-libxml2-4-0 branch July 6, 2023 03:32
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