package/spdlog: support dynamic library
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Tue, 26 Jan 2021 17:54:56 +0000 (18:54 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Tue, 26 Jan 2021 18:55:50 +0000 (19:55 +0100)
spdlog can install a shared library since version 1.4.0 and
https://github.com/gabime/spdlog/commit/45a18a61c633564311e51f5cbed2748e9cb70e2f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/spdlog/Config.in
package/spdlog/spdlog.mk

index 4aee1f7dd1206a123fb26739ddee3308becc5050..877c1b6ab7a18a3140831f7d35ccb205cd4d07e4 100644 (file)
@@ -5,7 +5,7 @@ config BR2_PACKAGE_SPDLOG
        depends on BR2_USE_WCHAR # fmt
        select BR2_PACKAGE_FMT
        help
-         Very fast, header only, C++ logging library.
+         Very fast, header-only/compiled, C++ logging library.
 
          https://github.com/gabime/spdlog
 
index 3c745f60ad0c90e960492c82585cc90cba9477c1..f5b331526acff9ca6f9a926f53292df775cab691 100644 (file)
@@ -8,6 +8,7 @@ SPDLOG_VERSION = 1.8.1
 SPDLOG_SITE = $(call github,gabime,spdlog,v$(SPDLOG_VERSION))
 SPDLOG_LICENSE = MIT
 SPDLOG_LICENSE_FILES = LICENSE
+SPDLOG_INSTALL_STAGING = YES
 SPDLOG_DEPENDENCIES = fmt
 SPDLOG_CONF_OPTS += \
        -DSPDLOG_BUILD_TESTS=OFF \
@@ -15,8 +16,10 @@ SPDLOG_CONF_OPTS += \
        -DSPDLOG_BUILD_BENCH=OFF \
        -DSPDLOG_FMT_EXTERNAL=ON
 
-# Header-only library
-SPDLOG_INSTALL_STAGING = YES
-SPDLOG_INSTALL_TARGET = NO
+ifeq ($(BR2_STATIC_LIBS),y)
+SPDLOG_CONF_OPTS += -DSPDLOG_BUILD_SHARED=OFF
+else
+SPDLOG_CONF_OPTS += -DSPDLOG_BUILD_SHARED=ON
+endif
 
 $(eval $(cmake-package))