Skip to content

Commit 4d5f18f

Browse files
committed
rpath loader_path for mac
1 parent 32623a3 commit 4d5f18f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/test-opencvsharp.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ jobs:
143143
- name: Build Test
144144
run: |
145145
cd test
146-
if [[ "${{ matrix.os }}" == win* ]]; then
146+
if [[ "${{ runner.os }}" == Windows ]]; then
147147
export MSYS2_ARG_CONV_EXCL="*"
148148
cl /nologo /EHsc test.c ../opencvsharp/lib/OpenCvSharpExtern.lib /link /OUT:test.exe
149+
elif [[ "${{ runner.os }}" == macOS ]]; then
150+
gcc test.c -L../opencvsharp/lib -lOpenCvSharpExtern -Wl,-rpath,@loader_path -o test
149151
else
150152
gcc test.c -L../opencvsharp/lib -lOpenCvSharpExtern -Wl,-rpath,'$ORIGIN' -o test.exe
151153
fi

0 commit comments

Comments
 (0)