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: Build directory spdlogConfigTargets.cmake doesn't provide a spdlog::spdlog_header_only target #2678

Closed
robertmaynard opened this issue Mar 15, 2023 · 3 comments · Fixed by #2846

Comments

@robertmaynard
Copy link
Contributor

The installed version of spdlogConfigTargets.cmake includes both the spdlog::spdlog and spdlog::spdlog_header_only targets. The build directory version only provides the compiled library target, which causes issues for dowstream consumers of the header only version.

This is caused by a mismatch between what targets are exported via the install and export commands.
Updating line https:/gabime/spdlog/blob/v1.x/CMakeLists.txt#L339 to also include spdlog_header_only would fix this issue.

@robertmaynard
Copy link
Contributor Author

In addition by not exporting the spdlog_header_only target it means that any downstream user that uses spdlog from source can't export a dependency that has a public dependency on spdlog_header_only

  export called with target "use_spdlog" which requires target "spdlog_header_only"
  that is not in any export set.

@gabime
Copy link
Owner

gabime commented Mar 18, 2023

@robertmaynard Thanks for reporting. PR to fix this would be most welcome.

@gabime
Copy link
Owner

gabime commented Jul 3, 2023

@robertmaynard Any chance you send PR for this before next release (few days)?

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 a pull request may close this issue.

2 participants