Code Monkey home page Code Monkey logo

juce.cmake's Introduction

Build status Build Status

JUCE.cmake

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

It currently contains:

  • Reprojucer.cmake, a CMake module that provides high-level functions to reproduce how a JUCE project is defined in the 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 to build JUCE's examples and extras projects (in Jucer2Reprojucer/generated/JUCE).

Requirements

  • CMake, version 3.4 minimum
  • JUCE, version 4.2.0 to 4.3.1 (JUCE 5 is not supported yet)

Getting started

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

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

We first build Jucer2Reprojucer with CMake. Since Jucer2Reprojucer uses the JUCE modules juce_core, juce_data_structures and juce_events, we specify where to find JUCE by defining JUCE_ROOT when calling cmake.

cd <root>/JUCE.cmake/Jucer2Reprojucer

mkdir build && cd build

# On macOS
cmake .. -G Xcode -DJUCE_ROOT=../../../JUCE
# On Linux and on Windows
cmake .. -DJUCE_ROOT=../../../JUCE

cmake --build .

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

cd <root>/MyGreatProject

# On macOs and on Windows
../JUCE.cmake/Jucer2Reprojucer/build/Debug/Jucer2Reprojucer MyGreatProject.jucer ../JUCE.cmake/cmake/Reprojucer.cmake
# On Linux
../JUCE.cmake/Jucer2Reprojucer/build/Jucer2Reprojucer MyGreatProject.jucer ../JUCE.cmake/cmake/Reprojucer.cmake

Now we can build MyGreatProject using CMake:

cd <root>/MyGreatProject

mkdir build && cd build

# On macOs
cmake .. -G Xcode -DMyGreatProject_jucer_FILE=../MyGreatProject.jucer
# On Linux and on Windows
cmake .. -DMyGreatProject_jucer_FILE=../MyGreatProject.jucer

cmake --build .

License

JUCE.cmake 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.

JUCE.cmake 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.

juce.cmake's People

Contributors

fgo-ableton avatar gonzaloflirt avatar martylake avatar mcmartin avatar

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.