spdlog: add
authorRosen Penev <rosenp@gmail.com>
Sat, 2 May 2020 23:33:17 +0000 (16:33 -0700)
committerRosen Penev <rosenp@gmail.com>
Sun, 3 May 2020 00:23:07 +0000 (17:23 -0700)
Needed for Gerbera 1.5.0

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/spdlog/Makefile [new file with mode: 0644]

diff --git a/libs/spdlog/Makefile b/libs/spdlog/Makefile
new file mode 100644 (file)
index 0000000..fb062f4
--- /dev/null
@@ -0,0 +1,58 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=spdlog
+PKG_VERSION:=1.5.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/gabime/spdlog/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a
+
+PKG_MAINTAINER:=
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+CMAKE_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+
+define Package/spdlog
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=spdlog
+  URL:=https://github.com/gabime/spdlog
+  DEPENDS:=+libfmt
+endef
+
+define Package/spdlog/description
+  Very fast, header-only/compiled, C++ logging library.
+endef
+
+CMAKE_OPTIONS += \
+       -DSPDLOG_BUILD_SHARED=ON \
+       -DSPDLOG_BUILD_EXAMPLE=OFF \
+       -DSPDLOG_BUILD_EXAMPLE_HO=OFF \
+       -DSPDLOG_BUILD_TESTS=OFF \
+       -DSPDLOG_BUILD_TESTS_HO=OFF \
+       -DSPDLOG_BUILD_BENCH=OFF \
+       -DSPDLOG_SANITIZE_ADDRESS=OFF \
+       -DSPDLOG_INSTALL=ON \
+       -DSPDLOG_FMT_EXTERNAL=ON \
+       -DSPDLOG_FMT_EXTERNAL_HO=OFF \
+       -DSPDLOG_NO_EXCEPTIONS=OFF
+
+TARGET_CXXFLAGS += -flto
+
+define Package/spdlog/install
+       $(INSTALL_DIR) $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspdlog.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,spdlog))