summaryrefslogtreecommitdiff
path: root/repo/fmt/fmt.xibuild
blob: c41592a440d2c6614bbe756fe96edc90ab75a20e (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
#!/bin/sh

NAME="fmt"
DESC="Open-source formatting library for C++"

MAKEDEPS="cmake doxygen python ninja"

PKG_VER=9.1.0
SOURCE="https://github.com/fmtlib/fmt/releases/download/$PKG_VER/fmt-$PKG_VER.zip"

build() {
	cmake -B . -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		$CMAKE_CROSSOPTS
	cmake --build .
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$PKG_DEST" cmake --install .
}