package/yaml-cpp: build shared library if needed
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 21 Apr 2020 18:35:43 +0000 (20:35 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 21 Apr 2020 19:36:15 +0000 (21:36 +0200)
yaml-cpp builds only a static library by default, this will raise a
build failure with upcoming mongodb 4.2.x as reported by Ryan Barnett
due to mongodb linking with a static library that obviously will miss
-fPIC

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/yaml-cpp/yaml-cpp.mk

index 906e554ed79677beeac79e5817ede76929a73c22..beb8d6f55fd8c1781d3055eafc19e89b54ade5ec 100644 (file)
@@ -15,4 +15,10 @@ YAML_CPP_CONF_OPTS += \
        -DYAML_CPP_BUILD_TESTS=OFF \
        -DYAML_CPP_BUILD_TOOLS=OFF
 
+ifeq ($(BR2_STATIC_LIBS),y)
+YAML_CPP_CONF_OPTS += -DYAML_BUILD_SHARED_LIBS=OFF
+else
+YAML_CPP_CONF_OPTS += -DYAML_BUILD_SHARED_LIBS=ON
+endif
+
 $(eval $(cmake-package))