How to headless build on Linux using JUCE 6.x.x and CMake

Hey guys,

the JUCE 6.0.0 release stated that it’s now possible to build headless Standalone applications (on Linux) out-of-the-box. I’d like to exactly that right now, but don’t know how to, using CMake.

Could anybody help me out here? Thank you!

All the best,
Lukas

P.S. I’m using:

  • kernel: 5.4.0-53-generic x86_64 (PC) and raspberrypi 5.4.51-v7l+ armv7l (RPi)
  • CMake: 3.18
  • JUCE: 6.0.4

You don’t need to do anything differently when using JUCE’s CMake support. If you are building a JUCE application for Linux using JUCE 6 then the same executable can run on systems both with and without the X11 libraries.

On the develop branch there have been some recent improvements:

2 Likes

If you’re just looking for advice on getting started with JUCE+CMake, I’d recommend checking out the example projects in examples/CMake in the repo, along with the API reference in the docs folder.

2 Likes

Alright, thx for the info!
So basically, running headless is nothing the programmer or user needs to take care of, but rather automized with JUCE6. Glad to hear that, simplicity is the way to go.

Thanks for the recommendation. I looked up a lot in the examples and the API reference during the last 2 months, both are definitely helful.