Skip to content

Commit

Permalink
Allow installation directory to contain spaces
Browse files Browse the repository at this point in the history
This previously worked, but regressed in v0.26.0.
  • Loading branch information
lovell committed Jul 2, 2021
1 parent 2104021 commit 95431bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'variables': {
'vips_version': '<!(node -p "require(\'./lib/libvips\').minimumLibvipsVersion")',
'platform_and_arch': '<!(node -p "require(\'./lib/platform\')()")',
'sharp_vendor_dir': '<(module_root_dir)/vendor/<(vips_version)/<(platform_and_arch)'
'sharp_vendor_dir': './vendor/<(vips_version)/<(platform_and_arch)'
},
'targets': [{
'target_name': 'libvips-cpp',
Expand Down Expand Up @@ -140,15 +140,15 @@
}],
['OS == "mac"', {
'link_settings': {
'library_dirs': ['<(sharp_vendor_dir)/lib'],
'library_dirs': ['../<(sharp_vendor_dir)/lib'],
'libraries': [
'libvips-cpp.42.dylib'
]
},
'xcode_settings': {
'OTHER_LDFLAGS': [
# Ensure runtime linking is relative to sharp.node
'-Wl,-rpath,\'@loader_path/../../vendor/<(vips_version)/<(platform_and_arch)/lib\''
'-Wl,-rpath,\'@loader_path/../../<(sharp_vendor_dir)/lib\''
]
}
}],
Expand All @@ -157,13 +157,13 @@
'_GLIBCXX_USE_CXX11_ABI=1'
],
'link_settings': {
'library_dirs': ['<(sharp_vendor_dir)/lib'],
'library_dirs': ['../<(sharp_vendor_dir)/lib'],
'libraries': [
'-l:libvips-cpp.so.42'
],
'ldflags': [
# Ensure runtime linking is relative to sharp.node
'-Wl,-s -Wl,--disable-new-dtags -Wl,-rpath=\'$$ORIGIN/../../vendor/<(vips_version)/<(platform_and_arch)/lib\''
'-Wl,-s -Wl,--disable-new-dtags -Wl,-rpath=\'$$ORIGIN/../../<(sharp_vendor_dir)/lib\''
]
}
}]
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Requires libvips v8.11.0
* Default to single-channel `b-w` space when `extractChannel` is used.
[#2658](https://github.com/lovell/sharp/issues/2658)

* Allow installation directory to contain spaces (regression in v0.26.0).
[#2777](https://github.com/lovell/sharp/issues/2777)

## v0.28 - *bijou*

Requires libvips v8.10.6
Expand Down

0 comments on commit 95431bd

Please sign in to comment.