Skip to contentSkip to conversation

cjson: build shared and static library

PATCH New Fabrice Fontaine 2 participants 6 messages Dec 31, 2017 – Jan 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cjson: build shared and static library

cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF by default so set it depending on BR2_SHARED_STATIC_LIBS value

---
 package/cjson/cjson.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/cjson/cjson.mk +6 -0
index f3ef7fd2ac..aabf3677ea 100644
@@ -15,4 +15,10 @@ CJSON_CONF_OPTS += \
 	-DENABLE_CJSON_TEST=OFF \
 	-DENABLE_CUSTOM_COMPILER_FLAGS=OFF
 
+ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=ON
+else
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 cjson: build shared and static library

Hello,

Quoted 13 lines · Fabrice Fontaine

cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF by default so set it depending on BR2_SHARED_STATIC_LIBS value

---
 package/cjson/cjson.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/cjson/cjson.mk +0 -0
index f3ef7fd2ac..aabf3677ea 100644

package/cjson/cjson.mk CJSON_CONF_OPTS += \ · line 24

Quoted 10 lines
package/cjson/cjson.mk +6 -0
@@ -15,4 +15,10 @@ CJSON_CONF_OPTS += \
 	-DENABLE_CJSON_TEST=OFF \
 	-DENABLE_CUSTOM_COMPILER_FLAGS=OFF
 
+ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=ON
+else
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
+endif
+
 $(eval $(cmake-package))

How is BR2_STATIC_LIBS=y handled ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 cjson: build shared and static library

Dear Thomas,

2017-12-31 17:56 GMT+01:00 Thomas Petazzoni <
[email protected]>:

Quoted 29 lines

Hello,

Quoted 13 lines · Fabrice Fontaine

cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF by default so set it depending on BR2_SHARED_STATIC_LIBS value

---
 package/cjson/cjson.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/cjson/cjson.mk +0 -0
index f3ef7fd2ac..aabf3677ea 100644

package/cjson/cjson.mk CJSON_CONF_OPTS += \ · line 24

Quoted 10 lines
package/cjson/cjson.mk +6 -0
@@ -15,4 +15,10 @@ CJSON_CONF_OPTS += \
      -DENABLE_CJSON_TEST=OFF \
      -DENABLE_CUSTOM_COMPILER_FLAGS=OFF
 
+ifeq ($(BR2_SHARED_STATIC_LIBS),y)
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=ON
+else
+CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
+endif
+
 $(eval $(cmake-package))

How is BR2_STATIC_LIBS=y handled ?

Quoted 1 line

If BUILD_SHARED_AND_STATIC_LIBS is not set, cjson uses the standard

BUILD_SHARED_LIBS option which is passed to OFF by buildroot if BR2_STATIC_LIBS is set.

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Best Regards,

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

#3 lore raw

PATCH 1/1 cjson: build shared and static library

Hello,

Happy New Year!

Quoted 5 lines · Fabrice Fontaine
Quoted 2 lines

How is BR2_STATIC_LIBS=y handled ?

If BUILD_SHARED_AND_STATIC_LIBS is not set, cjson uses the standard BUILD_SHARED_LIBS option which is passed to OFF by buildroot if BR2_STATIC_LIBS is set.

When you say "If BUILD_SHARED_AND_STATIC_LIBS is not set", do you mean BUILD_SHARED_AND_STATIC_LIBS=OFF or "no value is passed for BUILD_SHARED_AND_STATIC_LIBS" ?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 cjson: build shared and static library

Hello and happy new year,,

2018-01-01 12:04 GMT+01:00 Thomas Petazzoni <
[email protected]>:

Quoted 8 lines

Hello,

Happy New Year!

Quoted 2 lines · Fabrice Fontaine
Quoted 2 lines

How is BR2_STATIC_LIBS=y handled ?

Quoted 8 lines
Quoted 3 lines

If BUILD_SHARED_AND_STATIC_LIBS is not set, cjson uses the standard BUILD_SHARED_LIBS option which is passed to OFF by buildroot if BR2_STATIC_LIBS is set.

When you say "If BUILD_SHARED_AND_STATIC_LIBS is not set", do you mean BUILD_SHARED_AND_STATIC_LIBS=OFF or "no value is passed for BUILD_SHARED_AND_STATIC_LIBS" ?

I mean BUILD_SHARED_AND_STATIC_LIBS=OFF.

Quoted 9 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Best Regards,

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

#5 lore raw

PATCH 1/1 cjson: build shared and static library

In reply to Fabrice Fontaine

Hello,

Quoted 7 lines · Fabrice Fontaine

cjson 1.6.0 added the BUILD_SHARED_AND_STATIC_LIBS option which is OFF by default so set it depending on BR2_SHARED_STATIC_LIBS value

---
 package/cjson/cjson.mk | 6 ++++++
 1 file changed, 6 insertions(+)

I've added a comment in the .mk file and in the commit log to explain how BUILD_SHARED_AND_STATIC_LIBS interacts with BUILD_SHARED_LIBS. And I've applied to master.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com