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>
This commit is contained in:
Fabrice Fontaine 2017-12-31 17:29:33 +01:00 committed by Thomas Petazzoni
parent b6842c4097
commit aca8412ce2

View file

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