jellyr / FRUT

Building JUCE projects made easy using CMake

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FRUT

AppVeyor build status Travis CI build status Documentation status

FRUT is a collection of tools dedicated to building JUCE projects using CMake instead of Projucer.

It currently contains:

  • Reprojucer.cmake, a CMake module that provides high-level functions to reproduce how a JUCE project is defined in Projucer,
  • Jucer2Reprojucer, a console application based on JUCE that converts .jucer project files into CMakeLists.txt files that include and use Reprojucer.cmake,
  • several CMakeLists.txt files generated from existing .jucer project files, including:

Requirements

  • CMake, version 3.4 minimum
  • JUCE, version 4.2.0 minimum (JUCE 5 support is experimental)

Supported export targets

Reprojucer.cmake and Jucer2Reprojucer support the following Projucer export targets:

  • Xcode (MacOSX)
  • Visual Studio 2017
  • Visual Studio 2015
  • Visual Studio 2013
  • Linux Makefile

Documentation

You can read the documentation of FRUT on Read the Docs: http://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
...

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

$ cd <root>/MyGreatProject/

$ ../FRUT/prefix/FRUT/bin/Jucer2Reprojucer 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> -DMyGreatProject_jucer_FILE=../MyGreatProject.jucer
...
-- Configuring done
-- Generating done
-- Build files have been written to: <root>/MyGreatProject/build

$ cmake --build .
...

<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 and 2017 (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 file for more details.

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.

About

Building JUCE projects made easy using CMake

http://frut.readthedocs.io/

License:GNU General Public License v3.0


Languages

Language:CMake 88.2%Language:C++ 10.3%Language:C 1.5%