summaryrefslogtreecommitdiffstats
path: root/libs/gcem/Makefile
blob: d143cf6896cfe7f3d1283ea96d2d01bcb41da42e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
include $(TOPDIR)/rules.mk

PKG_NAME:=gcem
PKG_RELEASE:=1

# gcem upstream tags only sporadically; pin to the commit that fluidsynth
# 2.5.x's FindGCEM.cmake / submodule references. Update in lockstep with
# the consumer's expected revision.
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/kthohr/gcem.git
PKG_SOURCE_DATE:=2024-04-28
PKG_SOURCE_VERSION:=012ae73c6d0a2cb09ffe86475f5c6fba3926e200
PKG_MIRROR_HASH:=70df878c9d85281c6816c231cbb320a9eccb4fb73ef32612cf8948b17716fc49

PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE

CMAKE_INSTALL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

# upstream CMakeLists.txt declares cmake_minimum_required(VERSION 3.1),
# which trips modern CMake's deprecated-policy guard.
CMAKE_OPTIONS += \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5

define Package/gcem
  SECTION:=libs
  CATEGORY:=Libraries
  TITLE:=GCE-Math header-only constexpr math library
  URL:=https://github.com/kthohr/gcem
  BUILDONLY:=1
endef

define Package/gcem/description
GCE-Math (Generalized Constant Expression Math) is a templated C++
library enabling compile-time computation of mathematical functions.
Header-only; consumed at build time only.
endef

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include
	$(CP) $(PKG_INSTALL_DIR)/usr/include/gcem.hpp $(1)/usr/include/
	$(CP) $(PKG_INSTALL_DIR)/usr/include/gcem_incl $(1)/usr/include/
	$(INSTALL_DIR) $(1)/usr/lib/cmake/gcem
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/gcem/* $(1)/usr/lib/cmake/gcem/
endef

define Package/gcem/install
	:
endef

$(eval $(call BuildPackage,gcem))