diff --git a/catch2.sh b/catch2.sh new file mode 100644 index 0000000000..b3779ab277 --- /dev/null +++ b/catch2.sh @@ -0,0 +1,27 @@ +package: Catch2 +version: "%(tag_basename)s" +tag: v3.7.0 +source: https://github.com/catchorg/Catch2 +requires: + - "GCC-Toolchain:(?!osx)" +build_requires: + - CMake + - alibuild-recipe-tools + - ninja +prepend_path: + PKG_CONFIG_PATH: "$CATCH2_ROOT/share/pkgconfig" +--- +#!/bin/bash -e +cmake $SOURCEDIR -GNinja -DCMAKE_INSTALL_PREFIX="$INSTALLROOT" + +cmake --build . --target install + +# Modulefile +MODULEDIR="$INSTALLROOT/etc/modulefiles" +MODULEFILE="$MODULEDIR/$PKGNAME" +mkdir -p "$MODULEDIR" + +alibuild-generate-module --lib --cmake > "$MODULEFILE" +cat << EOF >> "$MODULEFILE" +prepend-path PKG_CONFIG_PATH \$PKG_ROOT/share/pkgconfig +EOF