Am Wed, 17 Mar 2021 17:52:10 +0100 schrieb "'Kay F. Jahnke' via hugin and other free panoramic software" <[email protected]>:
> Am 17.03.21 um 12:29 schrieb Bruno Postle:
> > On Wed 17-Mar-2021 at 11:12 +0100, Hugin ptx wrote:
> >> I'd like to tackle the find-the-font issue. CMake installs the font to
> >> a platform-specific location. The easiest way to deal with that is to
> >> simply hard-code this location in the C++ code and have it differ
> >> between the branches, so in the master branch I've modified the code
> >> pv_no_rendering.cc accordingly. It now does this:
> >>
> >> - if the user has passed a font on the CL, that takes preference.
> >>
> >> - next, lux will check the pwd. if the font isn't there
> >>
> >> - lux will try and access the target-specific location, assuming it
> >> has been installed on the local machine
> >
> > You have hard-coded /usr/local in this check:
> >
> > ?????? "/usr/local/share/lux/Sansation_Regular.ttf"
> >
> > Whereas (for example in Linux distribution package), this would be:
> >
> > ?????? "/usr/share/lux/Sansation_Regular.ttf"
>
> Thanks for pointing this out - I did fear it wasn't as easy as my quick
> shot :(
>
> > CMAKE_INSTALL_PREFIX defaults to "/usr/local", but can be set to
> > whatever location the builder likes (for rpm I'm setting it to "/usr").
> > Can you use this definition in a macro to compile-in the installed
> > location of the font?
>
> Good question.
>
> @Kornel: Maybe cmake can produce something like a pv_config.h header
> which has such platform-specific information? That should not be too
> hard - and it might be nice to maybe have a bit more platform-specific
> info at hand, like the user's home directory, to put stuff in which
> persists from session to session, and the location of the binary...
>
> I wouldn't be surprised if cmake does that all the time - I'm just not
> very good at it.
>
> Kay
>
I can do that. I have to know the variable-names and their value.
And of course the desired name of the header file.
Kornel
--
A list of frequently asked questions is available at:
http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/hugin-ptx/20210317191148.6bd1facf%40admin1-desktop.
pgpUPBu0luofO.pgp
Description: Digitale Signatur von OpenPGP
