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

**URL:** <https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822>\
**Category:** Linux\
**Created:** [November 19, 2020, 1:58pm UTC](https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822 "2020-11-19T13:58:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![koerthawkins](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/koerthawkins/32/16139_2.png) [@koerthawkins](https://forum.juce.com/u/koerthawkins)\
**Post date:** [November 19, 2020, 1:58pm UTC](https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822/1 "2020-11-19T13:58:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [November 19, 2020, 2:16pm UTC](https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822/2 "2020-11-19T14:16:13Z")

</div>

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:

> <https://github.com/juce-framework/JUCE/commit/bef6a912940e82691e6f055af6801110a47cbfbe>

> <https://github.com/juce-framework/JUCE/commit/f05ae1c709f5c9862fb220de0d7dedd870996e98>

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [November 19, 2020, 2:24pm UTC](https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822/3 "2020-11-19T14:24:58Z")

</div>

If you’re just looking for advice on getting started with JUCE+CMake, I’d recommend checking out the example projects in [examples/CMake](https://github.com/juce-framework/JUCE/tree/develop/examples/CMake) in the repo, along with the API reference in the [docs folder](https://github.com/juce-framework/JUCE/blob/develop/docs/CMake%20API.md).

---

<div class="post-metadata">

**Author:** ![koerthawkins](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/koerthawkins/32/16139_2.png) [@koerthawkins](https://forum.juce.com/u/koerthawkins)\
**Post date:** [November 19, 2020, 2:41pm UTC](https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822/4 "2020-11-19T14:41:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![koerthawkins](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/koerthawkins/32/16139_2.png) [@koerthawkins](https://forum.juce.com/u/koerthawkins)\
**Post date:** [November 19, 2020, 2:43pm UTC](https://forum.juce.com/t/how-to-headless-build-on-linux-using-juce-6-x-x-and-cmake/42822/5 "2020-11-19T14:43:12Z")

</div>

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.
