jsoncpp: do not always build static library
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Wed, 7 Mar 2018 21:47:03 +0000 (22:47 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 7 Mar 2018 22:02:46 +0000 (23:02 +0100)
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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/jsoncpp/jsoncpp.mk

index 3a2ee087b33629a71891d76c7d14613bc29fdacf..2b527fc3033b10adae153afc80572e6ee06593eb 100644 (file)
@@ -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))