kicad-developers team mailing list archive
Mailing list archive
How to redefine default system footprint/symbols/packages3d/templates search paths at build time?
Hello KiCad developers,
How can I redefine the default system
footprint/symbols/packages3d/templates base search paths at build time
using CMake options, so that KISYSMOD, KISYS3DMOD, KICAD_SYMBOL_DIR, and
KICAD_TEMPLATE_DIR all point to the directories:
First a quick update from flatpak land:
This week I merged the update to KiCad 5.1.6, fixed the ngspice
simulator in Eeschema, activated Python scripting, and added user
documentation to the KiCad flatpak. This means that flatpak users by now
get a KiCad experience that should support close to all features that
the software package offers.
But what I would like to do in order to make the installed size
(currently 6.2GB, mostly due to the 3D packages) a little bit more
controllable from the user perspective  is to move the footprint,
symbols, 3D models, and templates into separate "flatpak app extensions"
which can then be installed or removed independently of the main
The way flatpak extensions work is that you basically define an
"extension mount point" inside your main flatpak (I chose /app/data) for
whatever files and directories an installed extension wants to add into
I have set up those library extensions already, and they are being
mounted correctly inside the flatpak at runtime, but so far I wasn't
able to configure KiCad correctly to use this mount point as base dir
for the data files.
So far, I have tried either -DDEFAULT_INSTALL_PATH=/app/data or
-DCMAKE_INSTALL_DATADIR=/app/data during CMake configuration in two
different test builds (as those two options were appearing in
CMakeLists.txt and the surrounding lines seemed to indicate that they
were doing what I was trying to achieve).
Yet, none of the two did change anything (though I didn't try using both
together yet) regarding to the KiCad system paths. This is what I see in
"Preferences->Configure Paths" with or without redefining the CMake
I saw further CMake options which are all marked as advanced, thus I did
not try them yet.
Is there a way to achieve what I want to do with the current set of
CMake switches or would this need deeper plumbing?
Here's my current CMake setup:
(--prefix=/app is the default in flatpak land).
And version info:
Version: 5.1.6, release build
libcurl/7.65.3-DEV GnuTLS/3.6.13 (NSS/3.46.1) (OpenSSL/1.1.1d)
Platform: Linux 5.6.14-arch1-1 x86_64, 64 bit, Little endian, wxGTK
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+
OpenCASCADE Community Edition: 6.9.1
Compiler: GCC 9.2.0 with C++ ABI 1013
 To quote a user: "KiCad is AFAIK the biggest flatpak on Flathub" (