Depend on SONAME dylib
This commit is contained in:
@@ -32,14 +32,14 @@ BUILD_DIR = os.path.join(UC_DIR, 'build_python')
|
||||
VERSION = "2.0.0rc7"
|
||||
|
||||
if SYSTEM == 'darwin':
|
||||
LIBRARY_FILE = "libunicorn.dylib"
|
||||
LIBRARY_FILE = "libunicorn.2.dylib"
|
||||
STATIC_LIBRARY_FILE = None
|
||||
elif SYSTEM in ('win32', 'cygwin'):
|
||||
LIBRARY_FILE = "unicorn.dll"
|
||||
STATIC_LIBRARY_FILE = "unicorn.lib"
|
||||
else:
|
||||
LIBRARY_FILE = "libunicorn.so"
|
||||
STATIC_LIBRARY_FILE = None
|
||||
LIBRARY_FILE = "libunicorn.so.2"
|
||||
STATIC_LIBRARY_FILE = "libunicorn.a"
|
||||
|
||||
def clean_bins():
|
||||
shutil.rmtree(LIBS_DIR, ignore_errors=True)
|
||||
@@ -140,15 +140,8 @@ def build_libraries():
|
||||
subprocess.check_call(["cmake", "--build", ".", "-j" + threads])
|
||||
|
||||
shutil.copy(LIBRARY_FILE, LIBS_DIR)
|
||||
try:
|
||||
# static library may fail to build on windows if user doesn't have visual studio installed. this is fine.
|
||||
if STATIC_LIBRARY_FILE is not None:
|
||||
shutil.copy(STATIC_LIBRARY_FILE, LIBS_DIR)
|
||||
except FileNotFoundError:
|
||||
print('Warning: Could not build static library file! This build is not appropriate for a binary distribution')
|
||||
# enforce this
|
||||
if 'upload' in sys.argv:
|
||||
sys.exit(1)
|
||||
shutil.copy(STATIC_LIBRARY_FILE, LIBS_DIR)
|
||||
|
||||
os.chdir(cwd)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user