sudara / pamplejuce

A JUCE audio plugin template. JUCE 7, Catch2, Pluginval, macOS notarization, Azure Trusted Signing, Github Actions
https://melatonin.dev/blog/
MIT License
378 stars 37 forks source link

Request: add 'includes' file structure to template #20

Closed JoseDiazRohena closed 8 months ago

JoseDiazRohena commented 1 year ago

I spent a lot of time wracking my brain trying to sort how to build my project with source files outside of ~/repo_root/source. It's actually not very hard at all.

It would be nice to have something in the template making this more obvious. This could be as simple as a dummy class living in a ~/repo_root/libs/common folder that is referenced in the audio processor header and making the necessary changes to CMakeLists.txt.

sudara commented 1 year ago

I'm thinking about adding the melatonin inspector module as an example of a juce module. It would live in modules/melatonin_inspector — would that have been helpful?

What solution did you end up with?

JoseDiazRohena commented 1 year ago

I think what would have helped me is something that helped answer the simple question: what if want to use files that are not JUCE modules and not in the main source folder?

It turned out not being a big deal. If I recall correctly I just had to:

Part of me thinks "but this is 101 level stuff". The other part of me thinks "yeah, that's why this is a template". So I guess the real question whether the project is positioned towards rank cmake amateurs or people who just need a little boost getting cmake to work with JUCE.

sudara commented 1 year ago

It sounds like it's worth adding comments around the source files / include dirs in the CMakeLists.txt to more clearly explain what's happening and maybe make a mention in the companion blog article https://melatonin.dev/blog/how-to-use-cmake-with-juce/

JoseDiazRohena commented 1 year ago

Sounds good