-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Problems integrating yaml-cpp into project. Not using find_package? #1330
Comments
I'm not sure I understand. Is the documentation you linked to incorrect? If so, happy to update it. Also, happy to update the CMake file if you have a suggestion. I'm not a CMake expert at all, and basically just let people boss me around for whatever's in it. |
@acampove you did not indicate whether you are trying to integrate yaml-cpp as a system package dependency or a source/embedded (e.g. git submodule) dependency. You likely know that @jbeder the pattern you have documented is perfectly fine when using the repo as a source dependency. This pattern is commonly documented by other large projects:
In short, imo, what you have now is fine. Maybe could be improved to show how to use |
Hi, The documentation should contain: In order to integrate this project with CMAKE, add the following lines to the CMakeLists.txt find_package(YAML-CPP REQUIRED yaml-cpp)
if (NOT YAML-CPP_FOUND)
message(FATAL_ERROR "YAML-CPP found ${YAML-CPP_FOUND}")
endif() additionally, your cmake needs to define |
@ahogen Does the above text look reasonable? Based on e.g. fmt's documentation you linked to, this would be the "Installed" path? Would it be reasonable to essentially duplicate their three choices? |
Hi,
I am reading this after an hour wasted trying to build my project against yours. I normally do:
Which works with all the C++ projects I have ever used in the last 15 years. But you do not seem to do things this way. For some reason you seem to require the user to use
FETCHCONTENT
. It would be very beneficial for 99% of the people out there, who do not know whatFETCHCONTENT
is that you update the documentation.Cheers.
The text was updated successfully, but these errors were encountered: