Skip to content

Commit

Permalink
Fix building on M1 macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU authored and zbjornson committed Nov 11, 2021
1 parent a4b571b commit 1980805
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,11 @@
'-l<(jpeg_root)/lib/jpeg.lib',
]
}, {
'include_dirs': [
'<!@(pkg-config libjpeg --cflags-only-I | sed s/-I//g)'
],
'libraries': [
'-ljpeg'
'<!@(pkg-config libjpeg --libs)'
]
}]
]
Expand All @@ -180,7 +183,11 @@
'-l<(GTK_Root)/lib/gif.lib'
]
}, {
'include_dirs': [
'/opt/homebrew/include'
],
'libraries': [
'-L/opt/homebrew/lib',
'-lgif'
]
}]
Expand Down
3 changes: 2 additions & 1 deletion util/has_lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@ function hasPkgconfigLib (lib) {
function main (query) {
switch (query) {
case 'gif':
case 'jpeg':
case 'cairo':
return hasSystemLib(query)
case 'pango':
return hasPkgconfigLib(query)
case 'freetype':
return hasFreetype()
case 'jpeg':
return hasPkgconfigLib('libjpeg')
case 'rsvg':
return hasPkgconfigLib('librsvg-2.0')
default:
Expand Down

0 comments on commit 1980805

Please sign in to comment.