Skip to content

Add install info for CMake/Hunter #3938

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

caseymcc
Copy link

[Master] Add install info for CMake/Hunter

Description

Adds information on how to install pybind11 when using CMake/Hunter

Suggested changelog entry:

@Skylion007 Skylion007 requested a review from henryiii May 12, 2022 18:16
@Skylion007 Skylion007 added the docs Docs or GitHub info label May 12, 2022
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is @henryiii's domain, but I looked because I was curious and left some tiny suggestions.

I don't know much about cmake and never heard of hunter, but from a high-level perspective, is this the best place for this documentation? I think it would be better to have this in the hunter docs, and a link to that doc here. Something like:

Other build tools and package managers with pybind11 support:

  • hunter
  • ... I guess there are or will be more. Is that a reasonable guess?

Such links seem helpful, and having the landing pages maintained by the owners will scale nicely. (Vs pybind11 maintainers having to keep an eye on them.)

If you are not already using Hunter, download
`HunterGate <https://github.com/cpp-pm/gate/tree/master/cmake>`_ to a
directory in your repo (generally *cmake/HunterGate.cmake*). Then include it
in you CMakeLists file with:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in your
     ^

@@ -82,6 +82,44 @@ community contributors. If the version is out of date, please `create an issue
or pull request <https://github.com/Microsoft/vcpkg/>`_ on the vcpkg
repository.

Include with CMake/Hunter
==================
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few more = for style uniformity would be nice


.. code-block:: cmake

include("cmake/HunterGate.cmake") #or whatever directory you put it in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space after #? Also below (line 115)

@henryiii
Copy link
Collaborator

henryiii commented May 16, 2022

Looks like the latest version of pybind11 on hunter is 2.8.1. I remember the update process being slightly annoying with CLI11, others keep it up to date nowadays and I'm happy I haven't had to push the update in a while (since before it moved to cpp-pm, in fact). It mostly hurts that it's not automated or easy to automate. I'm not against docs here, though I'd push an update to hunter first (after the next release, which probably will be pretty soon because there are a couple of CMake issues that should be fixed soon (PRs open)). I am worried about this growing forever - maybe we could make this a "details" expander? Maybe after updating the docs formatting (which is on my long-term todo list)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Docs or GitHub info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants