Skip to content

Commit 3a3fc8f

Browse files
committed
Utilize pkg-config to get include/library paths for compiler
1 parent c92dbcc commit 3a3fc8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
arch: ${{ matrix.freebsd_arch }}
7979
usesh: true
8080
prepare: |
81-
pkg install -y krb5 node npm
81+
pkg install -y krb5 node npm pkgconf
8282
run: |
8383
node .github/scripts/build.mjs
8484

binding.gyp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@
8787
},
8888
}],
8989
['OS=="freebsd"', {
90-
'include_dirs': [
91-
'/usr/local/include',
90+
'include_dirs+': [
91+
'<!(pkg-config krb5 --cflags-only-I | sed -E "s/(-I *|-isystem *)//g")',
9292
],
9393
'link_settings': {
9494
'library_dirs': [
95-
'/usr/local/lib',
95+
'<!(pkg-config krb5 --libs-only-L | sed -e "s/-L//g")',
9696
]
9797
},
9898
}],

0 commit comments

Comments
 (0)