Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] tinyxml2: fix build in static libs configuration
@ 2017-05-03 19:04 Rahul Bedarkar
  2017-05-04 15:09 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Bedarkar @ 2017-05-03 19:04 UTC (permalink / raw)
  To: buildroot

tinyxml2 can build both static and shared libraries. By default, only
shared library is built. Shared/static builds are controlled using
separate cmake flags BUILD_SHARED_LIBS and BUILD_STATIC_LIBS.

In static libs configuration, we internally pass -DBUILD_SHARED_LIBS=OFF
cmake flag to build system which disables both shared and static builds
of library, resulting in failures while linking executable with library.

So pass -DBUILD_STATIC_LIBS=ON cmake flag in case of static libs
configuration.

fixes:
  http://autobuild.buildroot.net/results/d30/d301bcbe5db26068b35eaa94bd816ae8cf8ef2e1

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
---
 package/tinyxml2/tinyxml2.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/tinyxml2/tinyxml2.mk b/package/tinyxml2/tinyxml2.mk
index bb1e167..e289ca9 100644
--- a/package/tinyxml2/tinyxml2.mk
+++ b/package/tinyxml2/tinyxml2.mk
@@ -10,4 +10,8 @@ TINYXML2_LICENSE = Zlib
 TINYXML2_LICENSE_FILES = readme.md
 TINYXML2_INSTALL_STAGING = YES
 
+ifeq ($(BR2_STATIC_LIBS),y)
+TINYXML2_CONF_OPTS += -DBUILD_STATIC_LIBS=ON
+endif
+
 $(eval $(cmake-package))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-04 15:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-03 19:04 [Buildroot] [PATCH] tinyxml2: fix build in static libs configuration Rahul Bedarkar
2017-05-04 15:09 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox