Skip to content

Commit

Permalink
Properly built catch2 library
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf committed Sep 6, 2024
1 parent 843b50a commit 507e0df
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions catch2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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"
---
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

0 comments on commit 507e0df

Please sign in to comment.