[Buildroot] [PATCH 1/1] package/libwebsockets: fix static build with openssl
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Wed Oct 16 21:10:08 UTC 2019
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()
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list