start
From clone to running app. A C++20 compiler and CMake 3.31 or later are all you need to build the examples; when you are ready, pull YUP into your own project with FetchContent.
01Install the prerequisites
Pick your platform. Every target builds from the same sources.
- Windows
- Visual Studio 2022.
- macOS and iOS
- Xcode 15.2 and the command-line tools.
- Wasm
- Emscripten SDK 4.0.22 or later. The WebGPU port is fetched automatically.
- Android
- JDK 17, Android SDK and NDK r27c or later.
- Linux
- The packages below.
sudo apt-get update && sudo apt-get install -y \
libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev libfreetype6-dev \
libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev \
libxrandr-dev libxrender-dev libglu1-mesa-dev mesa-common-dev
02Clone and build the examples
A standard desktop build with tests and examples enabled.
git clone https://github.com/kunitoki/yup.git
cd yup
cmake -S . -B build -DYUP_BUILD_TESTS=ON -DYUP_BUILD_EXAMPLES=ON
cmake --build build --config Release --parallel 4git clone https://github.com/kunitoki/yup.git
cd yup
emcmake cmake -G "Ninja Multi-Config" -S . -B build -DYUP_BUILD_TESTS=ON -DYUP_BUILD_EXAMPLES=ON
cmake --build build --config Release --parallel 4
python3 -m http.server -d build# https://github.com/casey/just wraps the common CMake workflows
just mac # generate and open the Xcode project
just ninja # Ninja multi-config
just emscripten # build for Wasm
just test # run the unit testsThen run targets like example_graphics, example_app or example_console, and yup_tests for the test suite.
03Add YUP to your project
Fetch the framework and declare an app or plugin target with the modules you need.
cmake_minimum_required (VERSION 3.31)
project (my_app VERSION 1.0.0)
include (FetchContent)
FetchContent_Declare (yup
GIT_REPOSITORY https://github.com/kunitoki/yup.git
GIT_TAG main)
set (YUP_BUILD_EXAMPLES OFF)
set (YUP_BUILD_TESTS OFF)
FetchContent_MakeAvailable (yup)
yup_standalone_app (
TARGET_NAME my_app
TARGET_VERSION 1.0.0
TARGET_IDE_GROUP "MyApp"
TARGET_APP_NAMESPACE "com.mycompany"
TARGET_CXX_STANDARD 20
MODULES
yup::yup_gui
yup::yup_audio_devices)
target_sources (my_app PRIVATE main.cpp)cmake_minimum_required (VERSION 3.31)
project (my_app VERSION 1.0.0)
include (FetchContent)
FetchContent_Declare (yup
GIT_REPOSITORY https://github.com/kunitoki/yup.git
GIT_TAG main)
set (YUP_BUILD_EXAMPLES OFF)
set (YUP_BUILD_TESTS OFF)
FetchContent_MakeAvailable (yup)
yup_audio_plugin (
TARGET_NAME my_plugin
TARGET_VERSION 1.0.0
TARGET_IDE_GROUP "MyPlugin"
TARGET_APP_ID "com.mycompany.my_plugin"
TARGET_APP_NAMESPACE "com.mycompany"
TARGET_CXX_STANDARD 20
PLUGIN_ID "com.mycompany.MyPlugin"
PLUGIN_NAME "MyPlugin"
PLUGIN_VENDOR "com.mycompany"
PLUGIN_VERSION "1.0.0"
PLUGIN_IS_SYNTH OFF
PLUGIN_CREATE_CLAP ON
PLUGIN_CREATE_VST3 ON
PLUGIN_CREATE_AU ON
PLUGIN_CREATE_STANDALONE ON
MODULES
yup::yup_gui
yup::yup_audio_processors)
target_sources (my_plugin_shared PRIVATE plugin.cpp)04Write the app
A complete application: it starts, logs, and quits a second later. Build it with the target above.
#include <yup_gui/yup_gui.h>
class Application
: public yup::YUPApplication
, public yup::Timer
{
public:
yup::String getApplicationName() override {
return "yup app!";
}
yup::String getApplicationVersion() override {
return "1.0";
}
void initialise (const yup::String& commandLineParameters) override {
yup::Logger::outputDebugString (
"Starting app " + commandLineParameters);
startTimer (1000);
}
void shutdown() override {
yup::Logger::outputDebugString ("Shutting down");
}
void timerCallback() override {
stopTimer();
yup::MessageManager::callAsync ([this] { systemRequestedQuit(); });
}
};
START_YUP_APPLICATION (Application)
05Keep going
- Building standalone appsEvery
yup_standalone_appoption, resources and platform packaging. - Building audio pluginsFormats, install locations and the processor and editor classes.
- CMake API referenceTargets, module resolution and build options.
- Example appsGraphics, audio graph, plugin and console examples to learn from.