mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 08:53:14 +08:00
20 lines
793 B
Diff
20 lines
793 B
Diff
|
diff --git a/setup.py b/setup.py
|
||
|
index 43e807f20..df4d43d3d 100644
|
||
|
--- a/setup.py
|
||
|
+++ b/setup.py
|
||
|
@@ -1741,6 +1741,14 @@ def detect_compress_exts(self):
|
||
|
self.add(Extension('_bz2', ['_bz2module.c'],
|
||
|
libraries=['bz2'],
|
||
|
extra_link_args=bz2_extra_link_args))
|
||
|
+ elif (self.compiler.find_library_file(self.lib_dirs, 'bz2d')):
|
||
|
+ if MACOS:
|
||
|
+ bz2_extra_link_args = ('-Wl,-search_paths_first',)
|
||
|
+ else:
|
||
|
+ bz2_extra_link_args = ()
|
||
|
+ self.add(Extension('_bz2', ['_bz2module.c'],
|
||
|
+ libraries=['bz2d'],
|
||
|
+ extra_link_args=bz2_extra_link_args))
|
||
|
else:
|
||
|
self.missing.append('_bz2')
|
||
|
|