diff --git a/setup.py b/setup.py index 7813a9450..f245d64ef 100644 --- a/setup.py +++ b/setup.py @@ -168,6 +168,9 @@ def copy_extension_to_source(self, ext): if platform.system() == "Linux": src_filename = os.path.join(self.build_temp + '/src/libtriton', 'triton.so') dst_filename = os.path.join(self.build_lib, os.path.basename(filename)) + if os.getenv('Z3_INTERFACE') and 'libz3.so' in os.getenv('Z3_LIBRARIES'): + z3_lib_dir = subprocess.check_output(['pkg-config', '--variable=libdir', 'z3']).decode().strip() + copy_file(z3_lib_dir + '/libz3.so', self.build_lib, verbose=self.verbose, dry_run=self.dry_run) elif platform.system() == "Darwin": src_filename = os.path.join(self.build_temp + '/src/libtriton', 'libtriton.dylib') dst_filename = os.path.join(self.build_lib, os.path.basename(filename))