Skip to content

Instantly share code, notes, and snippets.

@sudara
Last active September 16, 2020 21:42
Show Gist options
  • Save sudara/14cce2cb83db61e0252ef550feed5c28 to your computer and use it in GitHub Desktop.
Save sudara/14cce2cb83db61e0252ef550feed5c28 to your computer and use it in GitHub Desktop.
How to put an existing JUCE app on CMAKE
  1. Download CMAKE https://cmake.org/download/

  2. Copy over the default CMakeLists.txt from https://github.com/juce-framework/JUCE/tree/master/examples/CMake/AudioPlugin

  3. Replace AudioPluginExample with the name of your project.

  4. Set JUCE path. Uncomment the add_subdirectory example. Let's add JUCE as a submodule. I'm assuming we want the develop branch.

git submodule add --branch develop --force -- https://github.com/juce-framework/JUCE/ JUCE

Let's commit those changes.

git commit .gitmodules JUCE -m 'Adding JUCE as a submodule'
  1. Set the correct flags for your plugin under juce_add_plugin. Check out the API https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment