Building JUCE projects using CMake made easy

Overview

Contributor Covenant Code of Conduct AppVeyor build status Azure Pipelines build status Documentation status

FRUT

FRUT makes it easy to build JUCE projects using CMake instead of Projucer. It enables more flexibility in project architecture, simplified CI setup, and easier integration with other JUCE and non-JUCE projects. Converting an existing JUCE project to FRUT is easy, and you don't need to be a CMake expert to use it!

In short

Table of Contents

Background

JUCE comes with its own project generation tool, Projucer, which is very useful when starting a JUCE project. However, Projucer doesn't scale well when you want to make some aspects of your project configurable, when you want to add external libraries, when you want to use Continuous Integration, or when you want to manage several projects at once.

FRUT was created to overcome these limitations, while making it very easy to migrate an existing JUCE project that uses Projucer. Since FRUT is based on CMake, you also get access to many great features of CMake, including testing and packaging utilities.

Contents

FRUT currently contains:

Requirements

  • CMake, version 3.4 minimum
  • JUCE, version 4.2.0 minimum

Supported Projucer exporters

Jucer2CMake and Reprojucer.cmake support the following Projucer exporters (also known as "export targets"):

Supported Exporter CMake requirements and options Missing features
✔️ Xcode (MacOSX) 2 unsupported Xcode exporter settings
✔️ Xcode (iOS) version 3.14 minimum
-G Xcode -DCMAKE_SYSTEM_NAME=iOS
✔️ Visual Studio 2019 version 3.14 minimum
✔️ Visual Studio 2017 version 3.7 minimum
(3.13.3 when VS 2019 is installed)
✔️ Visual Studio 2015
✔️ Visual Studio 2013
✔️ Linux Makefile
Android
✔️ Code::Blocks (Windows)
✔️ Code::Blocks (Linux)

Documentation

You can read the documentation of FRUT on Read the Docs: https://frut.readthedocs.io

Getting started

Let's consider that you have a copy of JUCE, a copy of FRUT and a JUCE project called MyGreatProject following this folder structure:

 
  
├── FRUT/
├── JUCE/
└── MyGreatProject/
    ├── Source/
    └── MyGreatProject.jucer

 

We first build and install FRUT with CMake:

$ cd 
  /FRUT/

$ mkdir build && cd build/

$ cmake .. -DCMAKE_INSTALL_PREFIX="../prefix" -DJUCE_ROOT="../../JUCE"
...
-- Configuring done
-- Generating done
-- Build files have been written to: 
  
   /FRUT/build

$ cmake --build . --target install
# or
$ cmake --build . --target install --parallel  # with CMake 3.12 or later
...

  
 

If it fails to build and install, please report the problem by creating a new issue on GitHub: https://github.com/McMartin/FRUT/issues/new.

Then we convert MyGreatProject.jucer to a new CMakeLists.txt file:

$ cd 
  /MyGreatProject/

$ ../FRUT/prefix/FRUT/bin/Jucer2CMake reprojucer MyGreatProject.jucer ../FRUT/prefix/FRUT/cmake/Reprojucer.cmake


  
   /MyGreatProject/CMakeLists.txt has been successfully generated.

  
 

Now we can build MyGreatProject using CMake:

$ cd 
  /MyGreatProject/

$ mkdir build && cd build/

$ cmake .. -G
  
   
...
-- Configuring done
-- Generating done
-- Build files have been written to: 
   
    /MyGreatProject/build

$ cmake --build .
# or
$ cmake --build . -- -parallelizeTargets  # when 
    
      is Xcode
# or
$ cmake --build . --parallel  # with CMake 3.12 or later
...

    
   
  
 

can be one of many CMake Generators supported by your platform, including Ninja, NMake Makefiles (on Windows), Unix Makefiles (on Linux and macOS), Visual Studio 2013, 2015, 2017 and 2019 (on Windows), and Xcode (on macOS).

Contributing

Contributions to FRUT are very welcomed and you can contribute even if you don't know anything about CMake. See the CONTRIBUTING.md file for more details.

Contributors

FRUT follows the all-contributors specification and is brought to you by these awesome contributors:


Alain Martin

💻 👀 📖

Matthieu Talbot

👀 💻 🐛

Florian Goltz

💻

Fabien Roussel

🐛 👀

Xavier Jouvenot

🐛 👀

Nikolai Wuttke

👀

Dominik Grzelak

🐛

Dennis Scheffer

🐛 💻

Scott Wheeler

💻 🐛

Iqra Shahzad

🐛

Romain Clement

🐛

Stijn Frishert

🐛

Jerry Chan

🐛 👀

Frank Lange

🐛

Johannes Elliesen

🐛 💻

David Holland

💻

Dimitri Sudell

🐛

Dan Raviv

🐛 👀

Rory Walsh

🐛

Eyal Amir

🐛

Michael Hetrick

🐛

Alex

💻 👀

Alexey Romanoff

🐛

Benedikt Sailer

🐛

Steve Baker

🐛

David Crome

🐛

JF Castel-Branco

🐛

Butch Warns

🐛

License

GNU General Public License

FRUT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

FRUT is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.

Comments
  • Failed to build and install BinaryDataBuilder

    Failed to build and install BinaryDataBuilder

    (edited on 2019.10.17) Reprojucer.cmake used to print the following error message when it failed to build and install BinaryDataBuilder:

    -- Building and installing BinaryDataBuilder
    CMake Error at <root>/FRUT/cmake/Reprojucer.cmake:2992 (message):
      Failed to build and install BinaryDataBuilder.  Please report this problem
      by writing a new comment on the following GitHub issue:
      https://github.com/McMartin/FRUT/issues/513
    

    If you are getting this error message when configuring one of your projects, please first update FRUT to commit 07f2f1c081a59dcdaafbc69461bedad63979d4f0 or more recent. Then try again to configure your project and read the new error message if it still fails to build and install BinaryDataBuilder.

    bug 
    opened by McMartin 31
  • Support compiling JUCE modules in separate targets

    Support compiling JUCE modules in separate targets

    This PR adds the COMPILE_IN_TARGET keyword to the jucer_project_module() command, which enables compiling JUCE module source files in specific targets.

    Fixes https://github.com/McMartin/FRUT/issues/9. Supersedes https://github.com/McMartin/FRUT/pull/349.

    @MartyLake, @scotchi: please review, thanks!

    opened by McMartin 19
  • CMake error when building the project

    CMake error when building the project

    After following the build instructions in the getting started, I am able to generate the CMakeLists.txt file, however when building this file, I get the following error: CMake Error: File /Users/vedant/Desktop/Programming/MUSI6106-Project/plugin_framework/GuitarAmpPlugin/data/JuceLibraryCode-Wrapper.cpp.in does not exist. CMake Error at /Users/vedant/Desktop/Programming/MUSI6106-Project/plugin_framework/FRUT/cmake/Reprojucer.cmake:557 (configure_file): configure_file Problem configuring file Call Stack (most recent call first): CMakeLists.txt:72 (jucer_project_module)

    I am using JUCE v.6.1.5 in CLion and the latest version of FRUT

    opened by VedantKalbag 18
  • Incorrect HEADER_SEARCH_PATHS after import...

    Incorrect HEADER_SEARCH_PATHS after import...

    Hi @McMartin . I'm excited to get going with this but have a hit a minor issue on the first attempt. The header paths from my Projucer files import correctly. They look like this:

      HEADER_SEARCH_PATHS
        "Builds/LinuxMakefile/\"/usr/local/include/csound\""
        "Builds/LinuxMakefile/\"/usr/include/csound\""
        "Builds/LinuxMakefile/\"~/SDKs/VST_SDK/VST3_SDK\""
    

    I can manually edit them and move on from there, but thought it might be worth noting in case I am doing something wrong?

    bug 
    opened by rorywalsh 11
  • Default architecture is i386, while through the Projucer it isn't

    Default architecture is i386, while through the Projucer it isn't

    When using FRUT to generate an XCode project through my generated CMakeLists.txt, Xcode throws up the following error:

    error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture.
    

    When I generate an XCode project from my Projucer directly, the architecture is fine.

    The OSX Architecture field in my Projucer is set to Default. When I change it to 64-bit Intel, the generated XCode project works, so it looks like the default isn't being detected correctly by FRUT.

    bug 
    opened by stijnfrishert 9
  • Codeblocks generation error

    Codeblocks generation error

    Hi, having problems with clion... but also with others...

    clion-2018.3.4/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /home/aldo/prova1/Projucer
    CMake Error at /home/aldo/FRUT/cmake/Reprojucer.cmake:1540 (message):
      You must call jucer_export_target("Code::Blocks (Linux)") before calling
      jucer_project_end().
    Call Stack (most recent call first):
      CMakeLists.txt:742 (jucer_project_end)
    

    Where did the string "Code::Blocks (Linux)" came from?

    here is the official string for the generators: https://cmake.org/cmake/help/latest/generator/CodeBlocks.html#codeblocks

    I saw that the code in Reprojucer.cmake improperly uses that string to check for the generator but it should be "CodeBlocks - Unix Makefiles"...

    I've even succeded cross compiling to mingw64 using mxe cmake toolchain with some hacks to the Reprojucer.cmake script. Much painful!

    opened by ovenpasta 9
  • Error during cmake --build . --target install (

    Error during cmake --build . --target install ("JUCE requires c++17 or later")

    Hi! Long story short, I have an assignment in which we were asked to export a project from Projuicer to Visual Studio. I would like to use Clion instead, but that requires that I convert the .jucer file to .cmake

    I'm using Windows10, so I installed WSL Ubuntu, got the whole thing running (after 3 hours of trial and error) I installed all the dependencies I could, but when running $ cmake --build . --target install the console says "Building CXX object Jucer2Make......" and then after 5 lines it breaks saying "91 | #error "JUCE requires C++17 or later"

    I have the latest version of g++ and clang installed on the ubuntu vm. I installed g++-multilib too.

    Do I need to add something additional to the build/target command ? I am learning C++ and I'm quite new to linux, so I apologize if this is a complete noob question. I've exhausted my options.

    In the meantime I can continue working on Visual Studio but it's inconvenient once I'm already used to my Clion IDE :(

    Thanks in advance to anyone who could give me a hint

    bug 
    opened by lucreciaef 8
  • JUCE 7 causing

    JUCE 7 causing "Undefined symbols for architecture x86_64"

    I recently updated to JUCE 7, and began getting this error when I try to build with CLion using CMake

    Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_MTLTextureDescriptor", referenced from:
          objc-class-ref in libBasic.a(include_juce_gui_basics.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    From a little digging, I think something is up with how FRUT is generating the CMake file. I am still able to build/run my code with Xcode using Projucer.

    opened by jdh9862 8
  • "Getting Started" should specify Juce modules root when directing user to run Reprojucer

    "Getting Started" should specify Juce modules root when directing user to run Reprojucer

    Otherwise an error is raised similar to: error: The module juce_audio_basics requires a global path. You should pass the JUCE modules global path using --juce-modules.

    opened by alexmadeathing 8
  • Release builds set to -march=native on Linux, making them incompatible with many machines

    Release builds set to -march=native on Linux, making them incompatible with many machines

    https://github.com/McMartin/FRUT/blob/282f7204f3bada25ea411e209180a4fa2384de20/cmake/Reprojucer.cmake#L1358

    It seems almost certainly wrong to use -march=native on release builds since it stands to reason that portable binaries are desired. Before realizing that FRUT was adding this flag, I spent several hours tracking down why VSTs built on my Linux desktop with this were crashing on startup when I installed the packages on my laptop. Specifically, the default x86-64 should probably not be overridden.

    bug 
    opened by scotchi 8
  • JUCE 5.2.0 - Icon

    JUCE 5.2.0 - Icon

    Hi @McMartin,

    I post this issue to report you a bug/limitation with the last version of FRUT (the one on master : 0db9b2a) and JUCE 5.2.0. The problem comes from the Icon (small) and Icon (large) fields in the Projucer. Indeed, to add an Icon to our standalone application, we added an image (png format) in Projucer and set it in the Icon (small) and Icon (large) fields, and when we built the application, no change seems to have occurred. Then we tried to build our application directly using Projucer, and the changes were effective.

    FYI, this icon is present in several places. Here is the ones we noticed :

    • When the standalone application is open, the icon represent the application in the Docker on OSX and in the Windows' taskbar.
    • When the file is build, his icon is the one set in the Projucer on both Operating System.
    • In Xcode, the targets icon is the one set by the Projucer too

    If you need more informations, or tests on this issue, don't hesitate to ask. Thanks for your time and your work :smiley:

    bug 
    opened by Xav83 8
  • Question: Release build containing local build strings

    Question: Release build containing local build strings

    Hi @McMartin,

    Apologies for the noob question. I'm fairly new to C++, CMake, JUCE and FRUT. Gotta start somewhere right ;). Firstly thanks for this amazing tool, it great to be able to build a whole project from the commandline rather than reliance on a GUI etc.

    I'm experimenting with both JUCE and FRUT at the moment, with the intention of creating a hardened release build. When running an build using the Xcode target even with STRIP_LOCAL_SYMBOLS I find strings related to the build including references to the cpp source files present in the binary. Futhermore, I also find mangled function names in clear sight that would aid a disassembler to circumvent any sort of registration process or aid other malicious intenent.

    The example export target that I'm using:

    jucer_export_target_configuration( "Xcode (MacOSX)" NAME "Release" DEBUG_MODE OFF BINARY_NAME "test_plugin" STRIP_LOCAL_SYMBOLS ON OPTIMISATION "-O3 (fastest with safe optimisations)" )

    I used the utility program called strings (which may have been installed with Xcode) to discover this. Do you know what I might be missing? Do I require linker flags or additional compiler switches.

    I'm using: Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: x86_64-apple-darwin21.6.0 Thread model: posix

    Many thanks in advance ;)

    opened by jackfruit2 3
  • Reprojucer.cmake doesn't support the setting `USE_MKL_LIBRARY_ONE_API`

    Reprojucer.cmake doesn't support the setting `USE_MKL_LIBRARY_ONE_API`

    If you would like Reprojucer.cmake to support the setting USE_MKL_LIBRARY_ONE_API ("Use MKL Library (oneAPI)" in Projucer), please leave a comment on this issue.

    missing feature exporter: Visual Studio 
    opened by McMartin 0
  • Reprojucer.cmake doesn't support the setting `USE_IPP_LIBRARY_ONE_API`

    Reprojucer.cmake doesn't support the setting `USE_IPP_LIBRARY_ONE_API`

    If you would like Reprojucer.cmake to support the setting USE_IPP_LIBRARY_ONE_API ("Use IPP Library (oneAPI)" in Projucer), please leave a comment on this issue.

    missing feature exporter: Visual Studio 
    opened by McMartin 0
  • Reprojucer.cmake doesn't support the setting `USE_LEGACY_BUILD_SYSTEM`

    Reprojucer.cmake doesn't support the setting `USE_LEGACY_BUILD_SYSTEM`

    If you would like Reprojucer.cmake to support the setting USE_LEGACY_BUILD_SYSTEM ("Use Legacy Build System" in Projucer), please leave a comment on this issue.

    missing feature exporter: Xcode 
    opened by McMartin 0
  • Reprojucer.cmake doesn't support the setting `USE_PRECOMPILED_HEADER`

    Reprojucer.cmake doesn't support the setting `USE_PRECOMPILED_HEADER`

    If you would like Reprojucer.cmake to support the setting USE_PRECOMPILED_HEADER ("Use Precompiled Header" in Projucer), please leave a comment on this issue.

    missing feature exporter: Xcode exporter: Visual Studio 
    opened by McMartin 0
  • Adding LV2 build support to FRUT

    Adding LV2 build support to FRUT

    Juce 7 now supports the LV2 plugin format.

    It's enabled via Projucer the same way the other formats are enabled, by adding a value to the JUCERPROJECT/pluginFormats property: buildLV2 (as compared to buildVST3 for VST3 for example)

    missing feature 
    opened by benediktadams 0
🔨🐍Make-like build automation tool for Python projects with extensive DSL features.

Pyke (WIP, Beta Release) Make-like build automation tool for Python projects with extensive DSL features. Features: Users can specify tasks, subtasks,

Ire 17 Jul 5, 2022
CLI tool for one-line installation of C++/CMake projects.

cmakip When working on virtual environments, Python projects can be installed with a single command invocation, for example pip install --no-deps . .

Artificial and Mechanical Intelligence 4 Feb 15, 2022
Python script for converting figma produced SVG files into C++ JUCE framework source code

AutoJucer Python script for converting figma produced SVG files into C++ JUCE framework source code Watch the tutorial here! Getting Started Make some

SuperConductor 1 Nov 26, 2021
The missing CMake project initializer

cmake-init - The missing CMake project initializer Opinionated CMake project initializer to generate CMake projects that are FetchContent ready, separ

null 1k Jan 1, 2023
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.6k Dec 30, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.6k Jan 2, 2023
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.7k Jan 8, 2023
Python package used on Hardfight projects to make building, testing and deploying easy.

Hardfight Devtools Build, test and deploy Hardfight projects easly ?? What is it Devtools is a Python tool to make building, testing and deploying int

Hardfight 1 Dec 5, 2021
:rocket: CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.

Project generator and manager for FastAPI. Source Code: View it on Github Features ?? Creates customizable project boilerplate. Creates customizable a

Yagiz Degirmenci 1k Jan 2, 2023
PyTorch deep learning projects made easy.

PyTorch Template Project PyTorch deep learning project made easy. PyTorch Template Project Requirements Features Folder Structure Usage Config file fo

Victor Huang 3.8k Jan 1, 2023
API for RL algorithm design & testing of BCA (Building Control Agent) HVAC on EnergyPlus building energy simulator by wrapping their EMS Python API

RL - EmsPy (work In Progress...) The EmsPy Python package was made to facilitate Reinforcement Learning (RL) algorithm research for developing and tes

null 20 Jan 5, 2023
Python Projects - Few Python projects with Testing using Pytest

Python_Projects Few Python projects : Fast_API_Docker_PyTest- Just a simple auto

Tal Mogendorff 1 Jan 22, 2022
This is a repository for "100 days of code challenge" projects. You can reach all projects from beginner to professional which are written in Python.

100 Days of Code It's a challenge that aims to gain code practice and enhance programming knowledge. Day #1 Create a Band Name Generator It's actually

SelenNB 2 May 12, 2022
Beginner Projects A couple of beginner projects here

Beginner Projects A couple of beginner projects here, listed from easiest to hardest :) selector.py: simply a random selector to tell me who to faceti

Kylie 272 Jan 7, 2023
A Screen Translator/OCR Translator made by using Python and Tesseract, the user interface are made using Tkinter. All code written in python.

About An OCR translator tool. Made by me by utilizing Tesseract, compiled to .exe using pyinstaller. I made this program to learn more about python. I

Fauzan F A 41 Dec 30, 2022
The windML framework provides an easy-to-use access to wind data sources within the Python world, building upon numpy, scipy, sklearn, and matplotlib. Renewable Wind Energy, Forecasting, Prediction

windml Build status : The importance of wind in smart grids with a large number of renewable energy resources is increasing. With the growing infrastr

Computational Intelligence Group 125 Dec 24, 2022
Industry ready custom API payload with an easy format for building Python APIs (Django/Django Rest Framework)

Industry ready custom API payload with an easy format for building Python APIs (Django/Django Rest Framework) Yosh! If you are a django backend develo

Abram (^o^) 7 Sep 30, 2022
A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

BlueDynamics Alliance 6 Jun 8, 2022
An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies.

miniFASTA An easy FASTA object handler, reader, writer and translator for small to medium size projects without dependencies. Installation Using pip /

Jules Kreuer 3 Jun 30, 2022
Cool little Python scripts & projects I've made.

Little Python Projects A repository for neat little Python scripts I've made! How to run a script: *NOTE: You'll need to install Python v3 or higher.

dood 1 Jan 19, 2022