Coder Social home page Coder Social logo

mcmartin / frut Goto Github PK

View Code? Open in Web Editor NEW
418.0 12.0 39.0 5.59 MB

Building JUCE projects using CMake made easy

Home Page: https://frut.readthedocs.io

License: GNU General Public License v3.0

CMake 82.55% C 0.96% C++ 15.51% Makefile 0.98%
juce cmake juce-framework build-tool

frut's Introduction

Contributor Covenant Code of Conduct AppVeyor 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"):

SupportedExporterCMake requirements and optionsMissing features
✔️Xcode (macOS) 4 unsupported Xcode exporter settings
✔️Xcode (iOS)version 3.14 minimum
-G Xcode -DCMAKE_SYSTEM_NAME=iOS
✔️Visual Studio 2022version 3.21 minimum 3 unsupported Visual Studio exporter settings
✔️Visual Studio 2019version 3.14 minimum
✔️Visual Studio 2017version 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: :

<root>
├── FRUT/
├── JUCE/
└── MyGreatProject/
    ├── Source/
    └── MyGreatProject.jucer

We first build and install FRUT with CMake: :

$ cd <root>/FRUT/

$ mkdir build && cd build/

$ cmake .. -DCMAKE_INSTALL_PREFIX="../prefix" -DJUCE_ROOT="../../JUCE"
...
-- Configuring done
-- Generating done
-- Build files have been written to: <root>/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 <root>/MyGreatProject/

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

<root>/MyGreatProject/CMakeLists.txt has been successfully generated.

Now we can build MyGreatProject using CMake: :

$ cd <root>/MyGreatProject/

$ mkdir build && cd build/

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

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

<generator> 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, 2019 and 2022 (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 Adams

🐛

Steve Baker

🐛

David Crome

🐛

JF Castel-Branco

🐛

Butch Warns

🐛

Suganthan BC

🐛

Thiébaud Fuchs

🐛 💻

Hayden Setlik

🐛

Adrian Ostrowski

💻

Naïl Perreau

🐛

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.

frut's People

Contributors

dscheffer avatar dustvoice avatar fgo-ableton avatar gitter-badger avatar gonzaloflirt avatar kauwua avatar martylake avatar mcmartin avatar scotchi avatar theslowgrowth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frut's Issues

Should we license JUCE.cmake under GPL like JUCE?

Currently, JUCE.cmake is licensed under MIT, but we might want to align it with JUCE, which is mostly licensed under GPL. Since there are only two contributors so far, it should be fairly easy to agree and change the license if that's what we want.

Building with no "debug/release" explicitely throws warnings

steps to reproduce (OSX 10.9):

git clone --depth=1 https://github.com/julianstorer/JUCE.git
git clone --depth=1 [email protected]:McMartin/JUCE.cmake.git
cd JUCE.cmake/extras/Projucer
mkdir build && cd build
cmake .. -G"Unix Makefiles" && make -j4

warnings generated: "NDEBUG or DEBUG has been defined - you should set one of these to make it clear whether this is a release build," [-W#warnings]
#warning "Neither NDEBUG or DEBUG has been defined - you should set one of these to make it clear whether this is a release build,""

Introduce .jucer -> CMakeLists.txt converter script

Add a script called Jucer2CMake.cmake that takes the path to a .jucer project file as input and creates a corresponding CMakeLists.txt file.

This will enable fast adoption and testing in production: one can use Projucer and JUCE.cmake at the same time until they feel confident enough to go full CMake.

Add option to remove warnings from JUCE

Atm, when using introjucer, compilers think juce source code is our code. And this library triggers various warnings. As a user, I don't want to adjust the warning level of my project depending on the warnings of the JUCE library, nor fix JUCE library to avoid warnings.

Complete the README

It should contain at least the following sections:

  • What's the problem this project is trying to solve (the final objective)
  • Project description : how this project solves the problem
  • Installation procedure / tutorial
  • How to contribute to the project

Long texts can be proxied to the wiki.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.