kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #43912
Re: How to redefine default system footprint/symbols/packages3d/templates search paths at build time?
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Sun, 24 May 2020 08:36:07 -0400
-
Autocrypt:
addr=stambaughw@xxxxxxxxx; prefer-encrypt=mutual; keydata= mQGiBEM0hxQRBAC2fNh3YOVLu1d5GZ0SbrTNldGiGnCJPLqzEnqFX9v6jmf33TMt6EmSLkl6 Wtfkoj0nVwKxcYmJkA8DX0QAokBkwNIzhSsBzQvthBLIk/5LnPVVKrEXOcL4mUyH1doKlkaE slgJozNa6Av+oavcvD02o1zJOloBbaHlNlyRt7fKswCgtIFlVjWggVH/15KfWk+Qo5JVPbME AIUBAQyL2OAx0n60AWec2WHnO9buHuG0ibtICgUMkE+2MRmYyKwYRdyVwGoIUemFuOyHp0AJ InX4T+vy2E7vkwODqjtMLfIoRkokW74Fi4nrvjlhOAw/vdq/twLbAmR9MOfPTpR4y7kQy1O2 /n+RkkRvh26vTzfbQmrH7cBJhk6aA/9Uwvu3E4zNJgHVZeS0HyWtmR1eOPPRbnkPgJTToX5O KMKzTJI/FX6kT7cFoCamitHrW3BJP4Dx+cMMsa47EGxqVTdbVJ4LjogsXTXxb+0Fn1u4zBdx x3Cer6O7+hqWy7zvpzeC6nSREjqDKa5CgHtv/GLm5uFPOmsjAsnHj2tlBrQmV2F5bmUgU3Rh bWJhdWdoIDxzdGFtYmF1Z2h3QGdtYWlsLmNvbT6IeAQTEQIAOBYhBOffs6CbblRzBkv33BtR cWlZ+CReBQJbFBS2AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEBtRcWlZ+CReMI8A nRbrLkzp7+c2f0vX7sfg4ICX8LAKAJ9uClo4uJajmZa5zZrL2nKdZlUwIrkCDQRDNIcxEAgA gCru+3/aOC6RCjpvYC72wY+d5SmHphC6yeiV2/mOumyt5MLo/Ps2GznZr11JspqFk5K/Zpvp MMLqqjDZ39+50a2iKRQFJ6NlK+hJWMmj6eJygQrCwYo3Gjc6CqfrqUv+8VSnf/i5sIZmtOVA 4ZjML18MuBvMSsNdVLFJd5HNnYb1iOECpvqdPVh/21LLCEw7MUUGGnHBhCrmk2aJe5hFmcSN g4ldBcXrgMQBwf7aMVoobXBMFDb/IENByXn0llB7Gr2IFMRmNS9/p8s/II1Yl2bTqyX4FSz8 cfn7C9KEz7faZ7wzAcpwHFC/zs3JoAjJ0IEKdNUpIwAlKMzT3CzctwADBQf/cxpG28MKyrqk nNmq/8LQLy+x6FSYXBLjxQz9BiBNYeesDZQ6J5UbL1mjpJzMa5tLZypPYo4bbGyR22hrbyDF K7m6AcVaMIJKl98g4ukMutFfAJyRDaREH5Zl/X1P4u1Z/yaAIy9mKaNbaK1/5djNJ5wCTFen TUgAp9xdc30kGkFDdLJFp5uxDY4P0vaZiZdjUCvDM3Zjv5IzpNOfxVqTUBQNUP/BnnKhkk0p DTD6s3X8S+D0rOtEBQ8K0cwERI/E8EFa8nj0TNw4e2MYGR8wg+SxqJ7z5f0zPY0bO6G9DDFB wYCqzzPWGqdAh9vA5971TAbPERtdFybhkurozp2SfYhJBBgRAgAJBQJDNIcxAhsMAAoJEBtR cWlZ+CResHUAniULLCWiT26ieRTl7N2vS6vBo/DuAJ4m7Ss/gyiW6ybTn1ctDXAUgm2QVQ==
-
In-reply-to:
<CAOuK9Lgqfh6x9kAATQa9aL5d=Mj+Gr6e_U6erG8u4v0hjeyqCA@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
If you want the default install path to be something other than
${CMAKE_INSTALL_PREFIX}, set ${DEFAULT_INSTALL_PATH} during config to
the desired path.
On 5/24/20 4:59 AM, Nick Østergaard wrote:
> Maybe some of thar stuff depends on CMAKE_INSTALL_PREFIX in some
> unexpected way?
>
> lør. 23. maj 2020 22.38 skrev Ian McInerney <Ian.S.McInerney@xxxxxxxx
> <mailto:Ian.S.McInerney@xxxxxxxx>>:
>
> Have you tried redefining the environment variables to point to the
> correct system libraries? Specifically I believe the 4 you need are:
> KICAD_TEMPLATE_DIR (the templates)
> KICAD_SYMBOL_DIR (the eeschema symbols)
> KISYSMOD (the modules)
> KISYS3DMOD (the 3d models)
>
> -Ian
>
>
>
> On Sat, May 23, 2020 at 8:50 PM Johannes Maibaum <jmaibaum@xxxxxxxxx
> <mailto:jmaibaum@xxxxxxxxx>> wrote:
>
> Hello KiCad developers,
>
> TL;DR:
> 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:
>
> $PREFIX/data/share/kicad/{modules,modules/packages3d,symbols,templates}
>
> instead of:
>
> $PREFIX/share/kicad/{modules,modules/packages3d,symbols,templates}?
>
>
> Longer version:
>
> 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 [1] 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
> application.
>
> 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
> the bundle.
>
> 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
> options:
>
> KICAD_SYMBOL_DIR=/app/share/kicad/library
> KICAD_TEMPLATE_DIR=/app/share/kicad/template
> KISY3DSMOD=/app/share/kicad/modules/packages3d
> KISYSMOD=/app/share/kicad/modules
>
> 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:
>
> "config-opts": [
> "-DBOOST_ROOT=/app",
> "-DDEFAULT_INSTALL_PATH=/app/data",
> "-DGLEW_INCLUDE_DIR=/app/include/GL",
> "-DOPENGL_glu_LIBRARY=/app/lib/libGLU.so",
> "-DKICAD_BUILD_QA_TESTS=OFF",
> "-DKICAD_SCRIPTING_PYTHON3=ON",
> "-DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON"
> ]
>
> (--prefix=/app is the default in flatpak land).
>
>
> And version info:
>
> Application: KiCad
> Version: 5.1.6, release build
> Libraries:
> wxWidgets 3.0.5
> libcurl/7.65.3-DEV GnuTLS/3.6.13 (NSS/3.46.1) (OpenSSL/1.1.1d)
> zlib/1.2.11 libidn2/2.2.0
> Platform: Linux 5.6.14-arch1-1 x86_64, 64 bit, Little endian, wxGTK
> Build Info:
> wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
> GTK+
> 3.24
> Boost: 1.66.0
> OpenCASCADE Community Edition: 6.9.1
> Curl: 7.65.3-DEV
> Compiler: GCC 9.2.0 with C++ ABI 1013
>
> Build settings:
> USE_WX_GRAPHICS_CONTEXT=OFF
> USE_WX_OVERLAY=ON
> KICAD_SCRIPTING=ON
> KICAD_SCRIPTING_MODULES=ON
> KICAD_SCRIPTING_PYTHON3=ON
> KICAD_SCRIPTING_WXPYTHON=ON
> KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
> KICAD_SCRIPTING_ACTION_MENU=ON
> BUILD_GITHUB_PLUGIN=ON
> KICAD_USE_OCE=ON
> KICAD_USE_OCC=OFF
> KICAD_SPICE=ON
>
>
>
> Cheers,
> Johannes
>
>
> [1] To quote a user: "KiCad is AFAIK the biggest flatpak on
> Flathub" (
> https://github.com/flathub/org.kicad_pcb.KiCad/issues/19#issuecomment-632761066
> )
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References