Skip to content
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

[cmake] Move options, correct install include path. fix libxml2-config.cmake #25

Closed
wants to merge 5 commits into from

Conversation

JackBoosY
Copy link

  • Move the options for dependencies to the top of find_package
    Reason: Automatically setting options for dependencies based on the search results of dependencies is an inappropriate thing: it may cause actual results to be inconsistent with expectations. So when the option is set to ON but the corresponding dependency cannot be found, it should report the error "Dependency not found".

  • Provide macro LIBXML2_INCLUDE_DIR
    Reason: Since libxml2 did not provide cmake export function before, most libraries use FindLibxml2.cmake in cmake, and some libraries use the LIBXML2_INCLUDE_DIR macro provided by cmake. Add this macro to better adapt to existing scenes.

  • Use the attributes of the target LibXml2::LibXml2 in libxml2-config.cmake instead of manually setting some macros (such as LIBXML2_INCLUDE_DIRS and LIBXML2_LIBRARIES).
    Reason: Since libxml2 now provides cmake building methods, we should trust the attributes automatically exported by cmake rather than manually implement them. In this way, when we modify the code in CMakeLists.txt, we do not need to modify libxml2.config.cmake.cmake.in synchronously.

Related: microsoft/vcpkg#14588

@gnomesysadmins
Copy link

Thank you for contributing to libxml2!

libxml2 uses GitLab for code review. As such we have forwarded
your contribution to the GNOME official GitLab instance:

https://gitlab.gnome.org/GNOME/libxml2/-/issues/207

GNOME's GitLab instance also supports GitHub as one of the possible
authentication method in case you'd like to follow up on the above
issue. You can login at the following URL:

https://gitlab.gnome.org/users/sign_in

If you are interested in sticking around within the GNOME community we
encourage you to read the following documents:

https://www.gnome.org/get-involved
and
https://wiki.gnome.org/Newcomers

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