yup! github
esc
search everything on yup.readthedocs.io

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.
linux packages
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 4

Then 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)

04Write the app

A complete application: it starts, logs, and quits a second later. Build it with the target above.

main.cpp
#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