summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2017-12-31 16:29:33 (GMT)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-01-03 21:08:30 (GMT)
commitaca8412ce27fdb216e80145933baa13c15118719 (patch)
tree02de5127ab66f619fc4baa9db8ad16b1778307d8
parentb6842c40977886058f3471973397872c880a0ddc (diff)
downloadbuildroot-aca8412ce27fdb216e80145933baa13c15118719.tar.gz
buildroot-aca8412ce27fdb216e80145933baa13c15118719.tar.bz2
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>
-rw-r--r--package/cjson/cjson.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk
index f3ef7fd..aabf367 100644
--- a/package/cjson/cjson.mk
+++ b/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))