Closed mossheim closed 3 years ago
This is wonderful like your other PR's @brianlheim - thank you. I was meaning to ask - is this generally a good/recommended way of linking each plugin with a library?
This is wonderful like your other PR's @brianlheim - thank you. I was meaning to ask - is this generally a good/recommended way of linking each plugin with a library?
I should clarify that I mean this workflow I have made with a seperate function and then calling it when the plugin is added with the files
I was meaning to ask - is this generally a good/recommended way of linking each plugin with a library?
it's decent, i think. normally, you would just link a target against the library, and that would take care of the include directories as well. i checked, but couldn't confirm that this happens with your library dependencies. it's made more complicated by the fact that each plugin represents two targets.
another way to do it (but requires some more advance CMake knowledge) would be to create a single interface library target for each plugin, and then the scsynth/supernova targets linking against then. then link that interface library target against eigen and friends. that way, you'd only have to call target_link_libraries() once per plugin, and wouldn't have to have wrapper functions. but I think this is equally complicated compared to what you are doing now.
Hi @brianlheim - I had to add a PUBLIC/PRIVATE flag to the include command you added, let me know if it doesn't look right https://github.com/madskjeldgaard/mkplugins/blob/c05ae18797d4c500c4dc4099af87702f488dbfd9/CMakeLists.txt#L90
thanks!
yep that's right, sorry about that!
No worries. Thanks for the help
this seems to be intended based on usage and the following target_link_libraries command