Browse Source

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.

If BUILD_SHARED_AND_STATIC_LIBS is set to OFF, cjson uses the standard
BUILD_SHARED_LIBS option which is passed by the cmake-package
infrastructure.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Fabrice Fontaine 7 năm trước cách đây
mục cha
commit
aca8412ce2
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      package/cjson/cjson.mk

+ 6 - 0
package/cjson/cjson.mk

@@ -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))