Skip to contentSkip to conversation

jsoncpp: do not always build static library

PATCH New Fabrice Fontaine 2 participants 2 messages Mar 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 jsoncpp: do not always build static library

Currently, static libray is always built as BUILD_STATIC_LIBS is ON by default so correctly set BUILD_STATIC_LIBS depending on BR2_SHARED_LIBS variable

---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Only set BUILD_STATIC_LIBS and not BUILD_SHARED_LIBS as it is already
set by the build system

 package/jsoncpp/jsoncpp.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/jsoncpp/jsoncpp.mk +6 -0
index 3a2ee087b3..2b527fc303 100644
@@ -15,4 +15,10 @@ JSONCPP_CONF_OPTS += \
 	-DJSONCPP_WITH_TESTS=OFF \
 	-DJSONCPP_WITH_STRICT_ISO=OFF
 
+ifeq ($(BR2_SHARED_LIBS),y)
+JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=OFF
+else
+JSONCPP_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.14.1
#1 lore raw

PATCH v2 1/1 jsoncpp: do not always build static library

Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Currently, static libray is always built as BUILD_STATIC_LIBS is ON by default so correctly set BUILD_STATIC_LIBS depending on BR2_SHARED_LIBS variable

---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Only set BUILD_STATIC_LIBS and not BUILD_SHARED_LIBS as it is already
set by the build system

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard