-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make Yato a library type target in cmake #2
Comments
As I see the INTERFACE target doesn't compile the provided source files (since 3.19 it can contain them), but the Yato library can be either header-only or contain .cpp files depending on build flags. So I would like to build it as a separate target, when it has sources. |
I see. Actually, I asked because it could be pretty convenient to use the library in the following way. add_library(MyLib)
target_link_libraries(MyLib PRIVATE Yato) According to cmake specification it seems to be impossible for custom targets. https://cmake.org/cmake/help/latest/command/target_link_libraries.html |
If you use only the core headers, then you dont need to add link to the Yato at all, since it is header-only library, just
Let me know if you think it is still inconvenient |
Right, but |
I got your point now. I'll think how I can improve this... |
Why not to use
instead of
add_custom_target
?https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries
The text was updated successfully, but these errors were encountered: