Buildroot Archive on 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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox