Skip to content

Reading settings

Theme
Text size
Line spacing
Reading width
Code text size
Dyslexia-friendly font · Motion

Building Musa CAD

CompleteChecked against Musa CAD 0.8.0Verified

Musa CAD builds from a fresh clone. Apart from a C++23 compiler, Qt 6 and the Vulkan headers, everything it needs is fetched by the build itself, and it depends on no other CAD library.

WhatMinimumNotes
C++23 compilerGCC 13, Clang 17, or MSVC 19.38 (Visual Studio 2022 17.8)-std=c++23, no extensions
CMake3.25uses presets version 6
Ninja1.10the presets’ generator
Qt 6 (Core, Gui, Widgets)6.4the window and the event loop
Vulkan loader and headers1.3needed to configure; the drawing area itself uses OpenGL, and nothing links Vulkan

Catch2, for the unit tests, is downloaded by CMake when the tests are built.

On Debian or Ubuntu:

Terminal window
sudo apt-get install -y build-essential cmake ninja-build qt6-base-dev libvulkan-dev
git clone https://github.com/MusaCAD/MusaCAD.git
cd MusaCAD
cmake --preset release
cmake --build --preset release

The program is build/release/bin/musacad_app. To draw, it needs a graphics driver with OpenGL 4.5 (Mesa for Intel and AMD, or NVIDIA’s driver).

PresetWhat it builds
releaseOptimised, no sanitizers, no tests.
devDebug, with AddressSanitizer and UndefinedBehaviorSanitizer (AddressSanitizer only on MSVC), and the unit tests.
tsanThreadSanitizer, for the concurrency tests. It cannot be combined with the dev sanitizers.
Terminal window
cmake --preset dev && cmake --build --preset dev && ctest --preset dev

See Tests for what the test run covers, and for the ThreadSanitizer setup.

DWG support is not compiled in, and adds nothing to the build. Musa CAD is LGPL; the DWG converters are GPL (LibreDWG) or proprietary (the ODA File Converter), so Musa CAD never links, bundles or ships them. It runs a converter as a separate program and reads the DXF it produces. A fresh build handles DXF straight away; for DWG, see DWG files.

Setting MUSACAD_SMOKE makes the program show its window and quit at once, which checks a clean start:

Terminal window
MUSACAD_SMOKE=1 QT_QPA_PLATFORM=offscreen ./build/dev/bin/musacad_app

On a machine with no OpenGL 4.5 (most CI runners), this ends with exit code 2 and the message that the viewport cannot be created. That is expected; the command line still works there.