mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
make mkdoc now works with the libclang distribution from Apple
This commit is contained in:
parent
e65e58716e
commit
afb9c1776a
@ -12,11 +12,6 @@ from collections import OrderedDict
|
||||
from threading import Thread, Semaphore
|
||||
from multiprocessing import cpu_count
|
||||
|
||||
if platform.system() == 'Darwin':
|
||||
libclang = '/opt/llvm/lib/libclang.dylib'
|
||||
if os.path.exists(libclang):
|
||||
cindex.Config.set_library_path(os.path.dirname(libclang))
|
||||
|
||||
RECURSE_LIST = [
|
||||
CursorKind.TRANSLATION_UNIT,
|
||||
CursorKind.NAMESPACE,
|
||||
@ -188,6 +183,17 @@ if __name__ == '__main__':
|
||||
parameters = ['-x', 'c++', '-std=c++11']
|
||||
filenames = []
|
||||
|
||||
if platform.system() == 'Darwin':
|
||||
libclang = '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib'
|
||||
if os.path.exists(libclang):
|
||||
cindex.Config.set_library_path(os.path.dirname(libclang))
|
||||
|
||||
base_path = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs'
|
||||
if os.path.exists(base_path):
|
||||
sysroot = os.path.join(base_path, next(os.walk(base_path))[1][0])
|
||||
parameters.append('-isysroot')
|
||||
parameters.append(sysroot)
|
||||
|
||||
for item in sys.argv[1:]:
|
||||
if item.startswith('-'):
|
||||
parameters.append(item)
|
||||
|
Loading…
Reference in New Issue
Block a user