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 intoCMakeLists.txt
files that include and useReprojucer.cmake
,- several
CMakeLists.txt
files generated from existing.jucer
project files, including:examples
andextras
projects from JUCE 4.2.0 (in generated/JUCE-4.2.0)examples
andextras
projects from JUCE 4.3.1 (in generated/JUCE-4.3.1)examples
andextras
projects from JUCE 5.0.0 (in generated/JUCE-5.0.0)examples
andextras
projects from JUCE 5.2.1 (in generated/JUCE-5.2.1)
- CMake, version 3.4 minimum
- JUCE, version 4.2.0 minimum
Reprojucer.cmake
and Jucer2Reprojucer
support the following Projucer export
targets:
- Xcode (MacOSX)
- Visual Studio 2017
- Visual Studio 2015
- Visual Studio 2013
- Linux Makefile
You can read the documentation of FRUT on Read the Docs: http://frut.readthedocs.io/
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).
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.
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.