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

Fix documentation for importing header only target with CMake #1265

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

sdebionne
Copy link
Contributor

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

@vitaut
Copy link
Contributor

vitaut commented Aug 14, 2019

Thanks for the PR, but fmt-header-only is an alias to fmt::fmt-header-only so the change is unnecessary:

add_library(fmt::fmt-header-only ALIAS fmt-header-only)

@vitaut vitaut closed this Aug 14, 2019
@sdebionne
Copy link
Contributor Author

When using fmt with find_package(), that is as an imported target, I think that fmt::fmt-header-only has to be used since :: tells CMake that it is an imported target. I came up with this PR after trying the following from the doc:

find_package(fmt)
target_link_libraries(<your-target> PRIVATE fmt-header-only)

This fails on my setup with a link error on the line of "unable to find fmt-header-only.so". But no big deal...

@vitaut vitaut reopened this Aug 14, 2019
@vitaut vitaut merged commit 2aae6b1 into fmtlib:master Aug 14, 2019
@vitaut
Copy link
Contributor

vitaut commented Aug 14, 2019

This fails on my setup with a link error on the line of "unable to find fmt-header-only.so".

Interesting. Let's merge this then.

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