-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Optimize cmake targets #1186
Optimize cmake targets #1186
Conversation
Nice! |
Yeah, I'm so happy you approve of this change. The following will use shared/static library find_package(glm CONFIG REQUIRED)
target_link_libraries(main PRIVATE glm::glm) And the following will use header-only version find_package(glm CONFIG REQUIRED)
target_link_libraries(main PRIVATE glm::glm-header-only) |
one thing that I don't understand or that is important with this. Can we choose to link with GLM as a static library xor dynamic library with this change? If yes, how? It's specifically important because :
So developers will want to choose across all these posibilities, even if the header only is in most cases the most convenient. I would also enjoy feedback from other people because all these install stuff, is beyond my understanding. Thanks! |
Yes.
|
And I add an option |
I hope this PR can be merged before 1.0.0 is released. |
But in the PR, |
It's built-in variable. See https://cmake.org/cmake/help/latest/command/add_library.html
Sorry, I have typo on my previous comments. It should be |
oh, ok, all good then! :) Would you mind to add a section on I bet other people don't know about this... |
Done~ |
Thanks for contributing! |
Allow the following usage
Like most header-only library did. Such as
fmt
andspdlog
.