Skip to content

Commit 9f1a400

Browse files
authored
Ask brew where it put ncurses
1 parent 83cd332 commit 9f1a400

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/cmake.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ jobs:
2525
if: ${{ matrix.os == 'macos-latest' }}
2626
run: |
2727
brew install ncurses
28-
echo "LDFLAGS=-L/opt/homebrew/opt/ncurses/lib" >> $GITHUB_ENV
29-
echo "CPPFLAGS=-I/opt/homebrew/opt/ncurses/include" >> $GITHUB_ENV
28+
echo "NCURSES_ROOT=$(brew --prefix ncurses)" >> $GITHUB_ENV
29+
echo "LDFLAGS=-L$(brew --prefix ncurses)/lib" >> $GITHUB_ENV
30+
echo "CPPFLAGS=-I$(brew --prefix ncurses)/include" >> $GITHUB_ENV
3031
3132
- name: Create Build Environment
3233
# Some projects don't allow in-source building, so create a separate build directory
@@ -41,7 +42,7 @@ jobs:
4142
# Note the current convention is to use the -S and -B options here to specify source
4243
# and build directories, but this is only available with CMake 3.13 and higher.
4344
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
44-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=/opt/homebrew/opt/ncurses
45+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=$NCURSES_ROOT
4546

4647
- name: Build
4748
working-directory: ${{github.workspace}}/build

0 commit comments

Comments
 (0)