tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cmake prefix buildink question
> Date: Sun, 1 Feb 2026 22:05:47 +0100
> From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
>
> I'm trying to build wip/freecad, and it chokes because cad/occt's cmake file
> includes path to the buildink directory:
> fgrep .buildlink /usr/pkg/lib/cmake/opencascade/OpenCASCADEVisualizationTargets.cmake
> INTERFACE_LINK_LIBRARIES "TKernel;TKMath;X11;fontconfig;/usr/tmp/cad/occt/work/.buildlink/lib/libfreeimage.so;/usr/tmp/cad/occt/work/.buildlink/lib/libfreetype.so"
> INTERFACE_LINK_LIBRARIES "TKBRep;TKMath;TKernel;TKService;TKShHealing;TKTopAlgo;TKG2d;TKG3d;TKGeomBase;TKMesh;TKGeomAlgo;TKHLR;GL;X11;/usr/tmp/cad/occt/work/.buildlink/lib/libfreetype.so"
>
> I guess this is because the installed files uses the same value as the one
> used to build the package.
> The attached patch works around this, but is there a better way to fix this ?
I think your approach is the usual one. See, e.g., x11/libfm-qt for
a similar example.
This came up a lot more about a year ago when we started to sanitize
the paths that cmake looks for, just like we've long done for
non-cmake build systems, to detect undeclared dependencies that will
cause trouble later on down the line. Erstwhile discussion of some of
the fallout:
https://mail-index.netbsd.org/tech-pkg/2024/12/25/msg030256.html
Not sure if the INTERFACE_LINK_LIBRARIES issue in particular was
discussed publicly, might have only been in private mail. But some
packages already had this workaround, like textproc/libkolabxml from
2021.
Home |
Main Index |
Thread Index |
Old Index