How I Set Up Every Audio Plugin C++ Project with JUCE, CMake, and Unit Tests [TEMPLATE REPO]

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 76

  • @WolfSoundAudio
    @WolfSoundAudio  Рік тому +2

    ☕ Want to support free content? Consider buying me a coffee at www.buymeacoffee.com/janwilczek Thanks!

    • @shjalili
      @shjalili Місяць тому

      ❤ thanks for you.....

    • @shjalili
      @shjalili Місяць тому

      But it would be better to save the content of the videos in the form of PDF files or docx files so that we don't have any problems for more and easier reviews. Thank you.

  • @brianmac8260
    @brianmac8260 8 місяців тому +7

    Why have you got a spider on your shoulder? @0:39

    • @ess.l
      @ess.l 2 місяці тому +1

      😂😂😂

  • @rallokkcaz
    @rallokkcaz 5 місяців тому +1

    I needed this tutorial so I could work with JUCE in a less painful way then the projucer, thank you so much!!!

  • @LamaLongboarder
    @LamaLongboarder Рік тому +2

    This exact topic was on my list to look in to today, and suddenly your video popped up. Too good to be true almost. Awesome explanation to get into using cmake with JUCE :)

  • @Beatsbasteln
    @Beatsbasteln Рік тому +6

    My problem with CMake is that no matter how much I try to learn it there's always something left I don't understand or did wrong, causing errors, bugs, confusion etc. and that just wastes my time, while the Projucer, while totally being a little limited, at least works perfectly fine. Nevertheless I'm happy that you made this tutorial, because I might have to deal with some CMake once I get more into the "serious" audio dev jobs.
    Edit: Oh and btw, I'd appreciate more content like this! Doesn't have to be super long fully featured CMake tuts everytime, but like whenever you learn something new about CMake in the context of audio dev :) I think that would be pretty cool

    • @WolfSoundAudio
      @WolfSoundAudio  Рік тому +3

      Thanks for your feedback! I agree that CMake may be challenging at times and that's why I'm here 😉

  • @busyworksbeats
    @busyworksbeats Рік тому +4

    🐐

  • @pmishraofficial
    @pmishraofficial Рік тому +2

    Awesome! Thank you sharing such a detailed tutorial on this topic.

    • @WolfSoundAudio
      @WolfSoundAudio  Рік тому +1

      My pleasure, thanks for the feedback! I'm learning from your openness and the will to help others 😉

  • @przekladanki
    @przekladanki Рік тому +2

    Wow! Another amazing video!

  • @vladlivelooping460
    @vladlivelooping460 6 місяців тому +1

    This is a very useful information. Thank you for recording this video! ))

  • @Bonzvy
    @Bonzvy 5 місяців тому +1

    This is incredible useful! Thank you for putting it so well together! I just do not prefer the way projucer is setting the project up. this would be my first cpp project and i am pumped!

  • @borges69
    @borges69 Рік тому +1

    Thanks again, I have a lot of details to work on, this video will be very useful

  • @NeZversSounds
    @NeZversSounds 9 місяців тому

    I love exploring FOSS projects (mainly game development).
    I grew hating Cmake because every developer wants to flex their build environment setup. There's too many ways how to configure it and 90% of projects doesn't build because one thing you would never think about. Latest project I found didn't build with "build" command but need to specifically open folder with VisualStudio and trigger build from opened cmake file there to build a project.
    In my experience Premake is more standardized for such tasks and worked every time I was checking projects.

  • @klob0t
    @klob0t 7 місяців тому +3

    so where is the .exe or .vst3 located? im a total noob

  • @taevion
    @taevion Рік тому +3

    Your vscode looks so good O. What extensions do you use?? Like the folder icons in the explorer tab and the files turning green whenever they are in a git repository.

    • @WolfSoundAudio
      @WolfSoundAudio  Рік тому +2

      Thank you @taevion, I love the icons too! It's an AMAZING VS Code extension called "Material Icon Theme" by Philipp Kief 😉

  • @marcosrivas9788
    @marcosrivas9788 Рік тому +1

    Awesome, as always!

  • @Scherbakov
    @Scherbakov 8 місяців тому

    Wow! I've been trying to figure out how to run Juce using CMake on Linux for a long time. And I took this template and it worked (though only with C++20)! Delight! Thanks for the template and video!
    But still, I wonder how you can manually connect the JUCE framework using CMake?

  • @ottaviosostero7267
    @ottaviosostero7267 7 місяців тому +4

    Thank you Jan!
    Is anyone else having a problem with the header files not found as part of the #include directive on the cpp files? I'm on Mac + VS Code (I really don't wanna use Xcode ahaha)

    • @stallings9060
      @stallings9060 6 місяців тому

      I'm having the same issue on Mac + VSCode. Any chance you got it figured out?

    • @cornelis4220
      @cornelis4220 4 місяці тому

      Me too! Have you been able to fix it?

    • @marius.orehovschi
      @marius.orehovschi 3 місяці тому

      Having the same issue, anyone else figured out a fix?

    • @cornelis4220
      @cornelis4220 3 місяці тому +1

      @@marius.orehovschi hey, if i remember correctly i was having trouble with including "JuceHeader.h" in other header or .cpp files. This method is deprecated, instead you should be importing the modules specific to the class / method you're importing; e.g. (check the JUCE docs). Not sure what your specific case is but hope this helps!

    • @ApolloViewModular
      @ApolloViewModular Місяць тому +1

      I was experiencing the same issue on OSX in VS Code. I went slightly 'off script', and it resolved it for me; instead of placing "PluginEditor.h" and "PluginProcessor" in "plugin/include/YourPluginName", - I put them in "plugin/include". Note on OSX, the "\" for paths is invalid; this only works on Windows. Paths need to be with a "/" on OSX.

  • @dendriloquist
    @dendriloquist 2 місяці тому

    Fantastic video like always.
    would it be possible to use this same CMake and package manager method on a mac and use VS Code , hence skip using the projucer and XCode
    ?

  • @pinnacle4616
    @pinnacle4616 5 місяців тому +1

    Thank you for this

  • @nolanerck
    @nolanerck 3 місяці тому

    Thanks, that was super helpful! :)

  • @jeremiahlyleseditor437
    @jeremiahlyleseditor437 6 місяців тому +2

    Are you going to make video for a audio VST using Rust?

    • @WolfSoundAudio
      @WolfSoundAudio  6 місяців тому +2

      Yes, I will 😉

    • @jeremiahlyleseditor437
      @jeremiahlyleseditor437 6 місяців тому

      @@WolfSoundAudio That's great. I've been looking for a tutorial, hoping to find a template for writing my own.

  • @Talel_kraiem
    @Talel_kraiem Рік тому +1

    This is my hero ❤

  • @hugogtmusic
    @hugogtmusic 11 місяців тому +1

    Great content, appreciate it.

  • @jwenaposse305
    @jwenaposse305 8 місяців тому

    Amazing video. My question is: imagine, after setting up the project like this. I open up the created xcodeproject file. Can I add new files inside xcode and safe and quit xcode and it will be put in the correct folders in our custom CMake structure? Or is it the same as when using Projucer that you can only create new files in Projucer (not in xcode).. probably the latter. As far as I can tell the benefit in using CMake is customisation to get a project runing on different platforms and different IDE's. (but actually the projucer provides this option as well.. you can click on the xcode button or on the visual studio button depending on the platform). I'm not sure if I am completely sold on the benefits of CMake yet :) I do like the concept of using the CPM though. Thnx again for the vid!

  • @Corredor1230
    @Corredor1230 10 місяців тому +2

    Hi, do I need to download JUCE to my project folder every time I create a new one? It seems like it would take up storage quite quickly in that case. Or could I remove the JUCE download command and simply set the include path to a global JUCE directory for all projects?

    • @WolfSoundAudio
      @WolfSoundAudio  10 місяців тому +1

      Yes, if you remove the SOURCE_DIR argument to the CPMAddPackage command, JUCE will be installed globally 🙂

    • @niemand9109
      @niemand9109 9 місяців тому

      @@WolfSoundAudio Thank you first of all for your content! I tried your suggestion but then i get the following error:
      Failed to configure juceaide.
      Coming from the \out\build\x64-Debug\_deps\juce-src\CMakeLists.txt.
      I also wanted to ask if the download of GoogleTest is sth. which could be done globaly. Or would you install it each time?

  • @albertobarrera7612
    @albertobarrera7612 Рік тому +1

    Hey, thank you for the video! I am curious about what the advantages of using CMake are instead of setting up the project through Projucer. CMake looks too complicated to achieve the same thing

    • @WolfSoundAudio
      @WolfSoundAudio  Рік тому +1

      I find that managing external libraries, compilation flags and compilation options is easier and more readable in CMake. Also many IDEs support CMakeLists.txt natively whereas they don't support Projucer files. It’s also easier to set up unit tests.

  • @Siddharth9092
    @Siddharth9092 9 місяців тому +1

    On MacOS I keep getting the following error:
    invalid application of 'sizeof' to an incomplete type 'juce::AccessibilityHandler’
    Looked around a little bit and tried solving using the suggested flag "-Wl,-weak_reference_mismatches,weak”. Didn’t work. 😣

    • @jw1865
      @jw1865 8 місяців тому +1

      Same here, did you manage to find a solution in the end? Would really appreciate it!

    • @Siddharth9092
      @Siddharth9092 7 місяців тому

      @@jw1865 Unfortuantely no, it worked flawlessly on windows without any problems but was unable to get it working on M1. So followed along on windows itself.

    • @ApolloViewModular
      @ApolloViewModular Місяць тому +1

      I had the same problem on OSX and I fixed it by changing the C++ standard to 17.
      In CMakeLists.txt change: set(CMAKE_CXX_STANDARD 23) >>>>>> set(CMAKE_CXX_STANDARD 17)

  • @doansai
    @doansai 8 місяців тому

    Thank you for sharing this template! Do you know if there's any solution for a VS juce code autocompletion or suggestion? It's a little very hard to remember the whole docs or lib syntax..

  • @TheQxY
    @TheQxY Рік тому +1

    Cool, I'll try this out. Did you base this on Pamplejuce? I think JUCE should offer something like this natively.

    • @WolfSoundAudio
      @WolfSoundAudio  Рік тому

      Thanks for the question: no, this is not based on Pamplejuce; I compare it to Pamplejuce at the end of the video at 37:54 , please check 🙂

    • @TheQxY
      @TheQxY Рік тому +1

      @@WolfSoundAudio Alright cool, I added it to my watch later list, no good internet right now. Thank you for your efforts!

  • @Brian-mf3ry
    @Brian-mf3ry 9 місяців тому

    my problem is that I cannot seem to get the .sln files after configuring everything. I am on windows and instead the cmake creates a Makefile in the build directory.

  • @VasaMusic438
    @VasaMusic438 5 місяців тому

    not only audioPlugin but also standAlone

  • @ess.l
    @ess.l 2 місяці тому

    Thank you for this. I am however very lost where to go after this. I know how to make simple changes to PluginProcessor.cpp, and I can try out my plug in if I load it to an external test host, or load it in Ableton, but I cannot manage to run and debug it in vscode. Is this just a matter of tweaking my launch.json/task.json and settings.json files to get them to work?

    • @ess.l
      @ess.l 2 місяці тому

      Ignore meeee, very silly mistake I was making 😂😅

  • @mindslikemine.8789
    @mindslikemine.8789 Рік тому +1

    wow legend!

  • @personone6881
    @personone6881 6 місяців тому

    @[08:20] I copied everything EXACTLY - (Yes, I've quadruple checked!) - but my project didn't build the 'Libs\cpm' folder at all!!! :(
    The CPM.cmake file on GIT is slightly different but I went through pausing the video and copying the pre-build code out precisely and ... nope...
    idk...

  • @jeremiahlyleseditor437
    @jeremiahlyleseditor437 6 місяців тому

    How would this process differ when using Rust?

  • @rossferguson9653
    @rossferguson9653 10 місяців тому

    Im getting Unknown CMake command "CPMAddPackage" when trying to install JUCE, do you know what i could do to fix this?

    • @WolfSoundAudio
      @WolfSoundAudio  10 місяців тому

      You're missing the CPM package manager - have you added it?

    • @rossferguson9653
      @rossferguson9653 10 місяців тому

      @@WolfSoundAudio yeah, I got the file downloaded into my libs/CPM folder, but the include doesn't seem to work, cmake doesn't recognise cpm's commands/functions.

    • @WolfSoundAudio
      @WolfSoundAudio  10 місяців тому

      Without the code, I cannot say more, apart from advising to update CMake maybe?

  • @stnhndg
    @stnhndg 6 місяців тому

    mmm... doesn't work. It throws a huge bunch of warnings (around 3000 lines). Starting from targetplatform errors ("JUCE_MAC JUCE_ANDROID etc blablabla").
    Windows10, JUCE 7.0.10 , Microsoft C++ comp. 19.29.30153, CMake 3.28.3, VSCode 1.86.1

    • @stnhndg
      @stnhndg 6 місяців тому

      ok. Apparantely there's a mistake in the video. Comparing git-hub example (working) with the video (not working) the difference is:
      - you don't put compiler options in higher level _cmakelist.txt_ file. Instead you put it in the one located in the _plugin_ folder;
      - it's not add_compile_options. It's target_compile_options;
      In that way it works.

    • @WolfSoundAudio
      @WolfSoundAudio  6 місяців тому +2

      Hi, thanks for the message. Compilers change, IDEs change, CMake changes, and JUCE changes so I am updating the repo to stay up to date 🙂

    • @stnhndg
      @stnhndg 6 місяців тому

      @@WolfSoundAudio thank you for your work!