On Fri, Oct 09, 2020 at 12:16:31PM +0100, Stuart Henderson wrote:
> On 2020/10/09 12:53, Caspar Schutijser wrote:
> > Hi,
> > 
> > Would it make sense to pass LDFLAGS="${LDFLAGS}" to cmake, similar to
> > what already happens with CC, CFLAGS, CXX, and CXXFLAGS? Proposal below.
> 
> This is a bit of a departure from how it's done for other build
> systems; LDFLAGS it not passed automatically to autoconf, etc.

That's something I did not consider. Good point.

> If this is done for cmake then I think it would be better to use something
> like MODCMAKE_LDFLAGS to reduce risk of inadvertent side-effects that
> you might get with LDFLAGS.
> 
> Any reason not to just set it in CONFIGURE_ENV like other ports do though?

No, not really. I think I'll go with either this suggestion or your
pkg-config suggestion. Thank you.

> > The reason I ran into this is because I'm working on a proposal/diff
> > (see the attachment for the WIP diff). In order for that patched port
> > to build, I need to set LDFLAGS but without this cmake.port.mk diff it
> > does not get passed to cmake.
> 
> The better fix for mosquitto would be to patch it to find libwebsockets
> via pkg-config files if available.

Reply via email to