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 3fde92e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions catch2.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 3fde92e

Please sign in to comment.