All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] jsoncpp: do not always build static library
@ 2018-03-07 21:18 Fabrice Fontaine
  2018-03-07 21:32 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2018-03-07 21:18 UTC (permalink / raw)
  To: buildroot

Currently, static libray is always built as BUILD_STATIC_LIBS is ON by
default so correctly set BUILD_STATIC_LIBS and BUILD_SHARED_LIBS
depending on BR2_xxx_LIBS variables

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/jsoncpp/jsoncpp.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/jsoncpp/jsoncpp.mk b/package/jsoncpp/jsoncpp.mk
index 3a2ee087b3..eb471561f0 100644
--- a/package/jsoncpp/jsoncpp.mk
+++ b/package/jsoncpp/jsoncpp.mk
@@ -15,4 +15,12 @@ JSONCPP_CONF_OPTS += \
 	-DJSONCPP_WITH_TESTS=OFF \
 	-DJSONCPP_WITH_STRICT_ISO=OFF
 
+ifeq ($(BR2_STATIC_LIBS),y)
+JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
+else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
+else ifeq ($(BR2_SHARED_LIBS),y)
+JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON
+endif
+
 $(eval $(cmake-package))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] jsoncpp: do not always build static library
  2018-03-07 21:18 [Buildroot] [PATCH 1/1] jsoncpp: do not always build static library Fabrice Fontaine
@ 2018-03-07 21:32 ` Thomas Petazzoni
  2018-03-07 21:38   ` Fabrice Fontaine
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-03-07 21:32 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  7 Mar 2018 22:18:42 +0100, Fabrice Fontaine wrote:

> +ifeq ($(BR2_STATIC_LIBS),y)
> +JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
> +else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
> +JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
> +else ifeq ($(BR2_SHARED_LIBS),y)
> +JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON
> +endif

BUILD_SHARED_LIBS=ON/OFF is already passed by package/pkg-cmake.mk. I
don't think we need to replicate it here.

So, just:

ifeq ($(BR2_SHARED_LIBS),y)
JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
else
JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
endif

is enough, no?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] jsoncpp: do not always build static library
  2018-03-07 21:32 ` Thomas Petazzoni
@ 2018-03-07 21:38   ` Fabrice Fontaine
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2018-03-07 21:38 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

2018-03-07 22:32 GMT+01:00 Thomas Petazzoni <thomas.petazzoni@bootlin.com>:

> Hello,
>
> On Wed,  7 Mar 2018 22:18:42 +0100, Fabrice Fontaine wrote:
>
> > +ifeq ($(BR2_STATIC_LIBS),y)
> > +JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
> > +else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
> > +JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
> > +else ifeq ($(BR2_SHARED_LIBS),y)
> > +JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON
> > +endif
>
> BUILD_SHARED_LIBS=ON/OFF is already passed by package/pkg-cmake.mk. I
> don't think we need to replicate it here.
>
> So, just:
>
> ifeq ($(BR2_SHARED_LIBS),y)
> JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
> else
> JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
> endif
>
> is enough, no?
>
You're right, I will update the patch accordingly.

>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> http://bootlin.com
>
Best Regards,

Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180307/e54d4a6c/attachment.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-07 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07 21:18 [Buildroot] [PATCH 1/1] jsoncpp: do not always build static library Fabrice Fontaine
2018-03-07 21:32 ` Thomas Petazzoni
2018-03-07 21:38   ` Fabrice Fontaine

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.