-
Notifications
You must be signed in to change notification settings - Fork 95
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] Including as add_subdirectory
does not declare the alias target ryml::ryml
#173
Comments
add_subdiretory
does not declare the alias target ryml::ryml
add_subdirectory
does not declare the alias target ryml::ryml
Yes, that's a needed improvement. |
biojppm
added a commit
to biojppm/cmake
that referenced
this issue
Dec 22, 2021
biojppm
added a commit
to biojppm/c4core
that referenced
this issue
Dec 22, 2021
biojppm
added a commit
that referenced
this issue
Dec 22, 2021
biojppm
added a commit
that referenced
this issue
Dec 22, 2021
biojppm
added a commit
that referenced
this issue
Dec 23, 2021
[fix] re #173: add alias target ryml::ryml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In CMake, the
find_package(ryml)
command defines the targetryml::ryml
, which is (afaik) the expected format for an imported target. It is good practice to make the library accessible with this name regardless of the method that was used to create the target, so that downstream CMake code does not need to worry about how the target was created/imported; the name should always beryml::ryml
.Currently, this is not true if rapidyaml is included as a submodule and then
add_subdirectory()
. This only creates the targetryml
. This causes issues:To fix this, I have to add to my own CMake scripts:
I believe this should be done by rapidyaml's root CMake file.
The text was updated successfully, but these errors were encountered: