I want to build a headless VST3 plugin for the RPi4. The X-compilation SDK I’m using contains no X11 headers whatsoever, and when I follow JUCE’s instructions to build the example CMake ConsoleApp, I get the following:
CMake Error at JUCE/extras/Build/juceaide/CMakeLists.txt:86 (message): Failed to build juceaide (...) ConsoleApp/JUCE/modules/juce_gui_basics/juce_gui_basics.h:319:12: fatal error: X11/Xlib.h: No such file or directory 319 | #include <X11/Xlib.h> | ^~~~~~~~~~~~ compilation terminated.
What I’ve done is:
- Copied the ConsoleApp folder out from JUCE/examples/CMake/, into its own folder.
- Cloned a Fresh copy of JUCE as a subdirectory of ConsoleApp.
- Edited ConsoleApp/CMakeLists.txt uncommenting line 28, to include JUCE (add_subdirectory(JUCE)) .
$ unset LD_LIBRARY_PATH
$ source /path/to/RPi4/x-compilation/sdk
- Ran CMake.
Since the SDK is for a platform lacking X11, I get the error I pasted earlier.
Is it so that the SDK needs the X11 headers?
From what I found in this forum, if a JUCE binary doesn’t find X11 during runtime, it defaults to running as headless. But I’ve found no mention on how to build, using CMake, without pulling in X11 headers.
Any ideas? Thanks in advance!