package/lzo: enable shared/static libs when needed
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 2 Sep 2017 14:28:53 +0000 (16:28 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 2 Sep 2017 16:41:01 +0000 (18:41 +0200)
In 61c4c63 (package/lzo: switch to cmake), building lzo has switched
from autotools to cmake. In the conversion, we've lost the build of the
shared library, because the cmake-based buildsystem of lzo explcitly
disables it by default.

Restore the shared library build.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/lzo/lzo.mk

index dba965fcd313176e59580fe60787331d1a0aa3ad..27ca459acf32986c029ca25b39f1a9bb35a14049 100644 (file)
@@ -11,5 +11,17 @@ LZO_LICENSE_FILES = COPYING
 LZO_INSTALL_STAGING = YES
 LZO_SUPPORTS_IN_SOURCE_BUILD = NO
 
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+LZO_CONF_OPTS += -DENABLE_SHARED=ON
+else
+LZO_CONF_OPTS += -DENABLE_SHARED=OFF
+endif
+
+ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+LZO_CONF_OPTS += -DENABLE_STATIC=ON
+else
+LZO_CONF_OPTS += -DENABLE_STATIC=OFF
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))