# Description: C++ Library for commandline flag processing
# URL: https://github.com/schuhschuh/gflags
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: cmake ninja

name=gflags
version=2.2.2
release=1
source=(https://github.com/schuhschuh/gflags/archive/v$version/$name-$version.tar.gz)

build() {
	cmake -S $name-$version -B build -G Ninja \
		-D CMAKE_INSTALL_PREFIX=/usr \
		-D CMAKE_BUILD_TYPE=Release \
		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
		-D REGISTER_INSTALL_PREFIX=OFF \
		-D BUILD_SHARED_LIBS=ON \
		-D BUILD_STATIC_LIBS=ON \
		-D BUILD_TESTING=ON \
		-Wno-dev

	cmake --build build
	DESTDIR=$PKG cmake --install build
}
