[Buildroot] [PATCH 1/1] package/libwebsockets: fix static build with openssl
Fabrice Fontaine
fontaine.fabrice at gmail.com
Thu Oct 17 16:57:43 UTC 2019
Le mer. 16 oct. 2019 à 23:10, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> a écrit :
>
> On Wed, 16 Oct 2019 23:08:34 +0200
> Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:
>
> > > > + if (NOT LWS_WITH_ESP32)
> > > > ++ find_package(PkgConfig QUIET)
> > > > ++ pkg_check_modules(PC_OPENSSL openssl QUIET)
> > > > + find_package(OpenSSL REQUIRED)
> > >
> > > Isn't the find_package() then redundant with pkg_check_modules() ?
> > I don't think upstream will accept to add a mandatory dependency on
> > pkg-config so I'll have to keep find_package as fallback.
> > Moreover, CMakeLists.txt sets OPENSSL_INCLUDE_DIRS to
> > OPENSSL_INCLUDE_DIR so I'll also have to update this line as
> > OPENSSL_INCLUDE_DIR won't be set by pkg_check_modules.
> > I think we should wait for the upstream's review.
>
> Then:
>
> find_package(PkgConfig QUIET)
> if(whatever is the right way to check if pkg-config was found)
> pkg_check_modules(PC_OPENSSL openssl QUIET)
> ... adjust LIBS/CFLAGS ...
> else()
> find_package(OpenSSL REQUIRED)
> endif()
Upstream merged the patch as is, should I sent them a new PR with your updates?
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,
Fabrice
More information about the buildroot
mailing list