How to compile KiCad with custom program file naming?

I am running nigthly KiCad for several years already, but I want to go deeper and start contributing some code to it.

I want to run both nigthly and my own compiled nigthly side by side,

I was not able to find it myself - what options do I give to cmake to compile to filenames like kicad_my_nightly, pcbnew_my_nigthly and so on?

There is no cmake option to change output file names and that’s not how it’s usually done.
Common practice is to pass CMAKE_INSTALL_PREFIX and have your custom build live in it’s own directory.

2 Likes

Or just do a normal cmake and pass DESTDIR to make install. Here’s my command line, invoked from kicad/build/debug:

cmake -DCMAKE_BUILD_TYPE=Debug -DKICAD_SCRIPTING_PYTHON3=ON -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON ../..; make -j16 install DESTDIR=/home/ola/KiCAD 2>&1 | tee make.out

(substitute two periods for the three that the forum software seems to put there) [fixed for ya]

With that command line the KiCAD binary goes to /home/ola/KiCAD/usr/local/bin/kicad, works well enough for me.

1 Like

That also works but it’s specific to make. Cmake param is universal and more flexible.

I was hoping to get advice on something like how to get a custom naming like kicad_nigthly vs kicad, but nevertheless, thanks people, will do an install to a separate directory!

for that to appear in the XDG applications menu, that should be a simple case of applying a patch pre-compile to rename the kicad.application file and its content

I recommend you take a look at the excellent AUR package kicad-nightly that does this exactly, renaming kicad to kicad-nightly. If you aren’t already aware of how the AUR works, you’ll have to git clone https://aur.archlinux.org/kicad-nightly.git, to view the package sources, and you can look at the PKGBUILD file, which is just a shell script, for how it was done.

The ubuntu ppa package does the same, see https://gitlab.com/kicad/packaging/kicad-ubuntu-builder/kicad-daily-package/-/blob/dailybuild/debian/rules (I guess it’s that file, I’m not so familiar with .deb packaging).

Thanks! Exactly what I was looking for!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.