Update .gitea/workflows/build.yaml
All checks were successful
Build Wowlet / build-macos (push) Successful in 1m33s

This commit is contained in:
2026-01-05 06:42:31 -08:00
parent 2a5f2cf1b1
commit 44b3155116

View File

@@ -39,11 +39,20 @@ jobs:
- name: Patch for macOS (Remove librt)
run: |
echo "Patching src/CMakeLists.txt to remove Linux-only 'rt' library..."
# Use sed to find " rt " and replace it with a space.
# The -i '' is required for macOS sed to edit in-place.
sed -i '' 's/ rt / /g' src/CMakeLists.txt
sed -i '' 's/ rt)/ )/g' src/CMakeLists.txt
echo "Patching CMakeLists to remove Linux-only 'rt' library..."
# 1. Use Perl to replace 'rt' with nothing, respecting word boundaries (\b).
# This catches " rt ", " rt)", " rt", etc., regardless of whitespace.
perl -i -pe 's/\brt\b//g' src/CMakeLists.txt
# 2. Just in case it's in the root file too (some forks do this)
if [ -f "CMakeLists.txt" ]; then
perl -i -pe 's/\brt\b//g' CMakeLists.txt
fi
# 3. Print the file to the log so we can verify the patch worked (Debugging)
echo "--- DEBUG: src/CMakeLists.txt content after patch ---"
grep -C 5 "target_link_libraries" src/CMakeLists.txt || true
- name: Build macOS
run: |