Skip to content

Commit d8504f8

Browse files
committed
ci(mac): Set Homebrew paths for autoconf HARDSUBX build
The AC_CHECK_LIB checks in configure.ac need LDFLAGS and CPPFLAGS to find libraries installed via Homebrew (in /opt/homebrew on Apple Silicon or /usr/local on Intel Macs).
1 parent 70404c2 commit d8504f8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/build_mac.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,13 @@ jobs:
132132
run: ./autogen.sh
133133
working-directory: ./mac
134134
- name: configure with hardsubx
135-
run: ./configure --enable-hardsubx --enable-ocr
135+
run: |
136+
# Set Homebrew paths for configure to find libraries
137+
export HOMEBREW_PREFIX="$(brew --prefix)"
138+
export LDFLAGS="-L${HOMEBREW_PREFIX}/lib"
139+
export CPPFLAGS="-I${HOMEBREW_PREFIX}/include"
140+
export PKG_CONFIG_PATH="${HOMEBREW_PREFIX}/lib/pkgconfig"
141+
./configure --enable-hardsubx --enable-ocr
136142
working-directory: ./mac
137143
- name: make
138144
run: make

0 commit comments

Comments
 (0)