Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building on M1 macOS #1910

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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