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. 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? > 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.