mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-02 21:25:26 +00:00
Fixed crypto library name for windows
This commit is contained in:
parent
2209f56cd5
commit
7203a8bbb9
1 changed files with 12 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
|||
# Support code for building a C extension with crypto code
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
is_win32 = sys.platform.startswith('win32')
|
||||
|
||||
|
||||
def multi_join(paths, *path_segments):
|
||||
|
@ -11,9 +14,16 @@ def multi_join(paths, *path_segments):
|
|||
def crypto_ext_kwargs(pc, system_prefix):
|
||||
if system_prefix:
|
||||
print('Detected OpenSSL [via BORG_OPENSSL_PREFIX]')
|
||||
if is_win32:
|
||||
lib_dir = system_prefix
|
||||
lib_name = 'libcrypto'
|
||||
else:
|
||||
lib_dir = os.path.join(system_prefix, 'lib')
|
||||
lib_name = 'crypto'
|
||||
|
||||
return dict(include_dirs=[os.path.join(system_prefix, 'include')],
|
||||
library_dirs=[os.path.join(system_prefix, 'lib')],
|
||||
libraries=['crypto'])
|
||||
library_dirs=[lib_dir],
|
||||
libraries=[lib_name])
|
||||
|
||||
if pc and pc.exists('libcrypto'):
|
||||
print('Detected OpenSSL [via pkg-config]')
|
||||
|
|
Loading…
Reference in a new issue