osx: customize include of headers
This commit is contained in:
parent
65e96cf2b7
commit
1716f4ecd4
1 changed files with 25 additions and 14 deletions
39
osx/wrap.py
39
osx/wrap.py
|
@ -26,9 +26,13 @@ def copy_all_items(pattern,place,recursive=False):
|
|||
else:
|
||||
shutil.copy(i,place)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
|
||||
# include headers for a full SDK?
|
||||
INCLUDE_HEADERS = False
|
||||
|
||||
|
||||
# final resting place
|
||||
install_path = '/Library/Frameworks'
|
||||
|
||||
|
@ -62,17 +66,19 @@ if __name__ == "__main__":
|
|||
copy_all_items('sources/lib/libicui1*dylib',join(active,'unix/lib'),recursive=True)
|
||||
|
||||
# install icu includes
|
||||
if not os.path.exists(join(active,'unix/include/unicode')):
|
||||
os.mkdir(join(active,'unix/include/unicode'))
|
||||
copy_all_items('sources/include/unicode/*',join(active,'unix/include/unicode'),recursive=True)
|
||||
if INCLUDE_HEADERS:
|
||||
if not os.path.exists(join(active,'unix/include/unicode')):
|
||||
os.mkdir(join(active,'unix/include/unicode'))
|
||||
copy_all_items('sources/include/unicode/*',join(active,'unix/include/unicode'),recursive=True)
|
||||
|
||||
# install boost libs
|
||||
copy_all_items('sources/lib/libboost*dylib',join(active,'unix/lib'),recursive=True)
|
||||
|
||||
# install boost includes
|
||||
if not os.path.exists(join(active,'unix/include/boost')):
|
||||
os.mkdir(join(active,'unix/include/boost'))
|
||||
copy_all_items('sources/include/boost/*',join(active,'unix/include/boost'),recursive=True)
|
||||
if INCLUDE_HEADERS:
|
||||
if not os.path.exists(join(active,'unix/include/boost')):
|
||||
os.mkdir(join(active,'unix/include/boost'))
|
||||
copy_all_items('sources/include/boost/*',join(active,'unix/include/boost'),recursive=True)
|
||||
|
||||
# install rasterlite lib
|
||||
copy_all_items('sources/lib/librasterlite*dylib',join(active,'unix/lib'),recursive=True)
|
||||
|
@ -81,10 +87,11 @@ if __name__ == "__main__":
|
|||
copy_all_items('sources/lib/libfreetype*dylib',join(active,'unix/lib'),recursive=True)
|
||||
|
||||
# install freetype2 includes
|
||||
if not os.path.exists(join(active,'unix/include/freetype2')):
|
||||
os.mkdir(join(active,'unix/include/freetype2'))
|
||||
copy_all_items('sources/include/freetype2/*',join(active,'unix/include/freetype2'),recursive=True)
|
||||
copy_all_items('sources/include/ft2build.h',join(active,'unix/include/'),recursive=True)
|
||||
if INCLUDE_HEADERS:
|
||||
if not os.path.exists(join(active,'unix/include/freetype2')):
|
||||
os.mkdir(join(active,'unix/include/freetype2'))
|
||||
copy_all_items('sources/include/freetype2/*',join(active,'unix/include/freetype2'),recursive=True)
|
||||
copy_all_items('sources/include/ft2build.h',join(active,'unix/include/'),recursive=True)
|
||||
|
||||
# Node-mapnik bindings snapshot
|
||||
if not os.path.exists(join(active,'unix/lib/node')):
|
||||
|
@ -92,7 +99,7 @@ if __name__ == "__main__":
|
|||
os.mkdir(join(active,'unix/lib/node/mapnik'))
|
||||
sym(join(active,'unix/lib/node'),join(active,'Node'))
|
||||
sym(join(active,'Node'),join(framework,'Node'))
|
||||
copy_all_items('/usr/local/lib/node/mapnik/*',join(active,'unix/lib/node/mapnik/'),recursive=True)
|
||||
copy_all_items('sources/lib/node/mapnik/*',join(active,'unix/lib/node/mapnik/'),recursive=True)
|
||||
|
||||
# Resources
|
||||
if not os.path.exists(join(active,'Resources')):
|
||||
|
@ -103,8 +110,12 @@ if __name__ == "__main__":
|
|||
shutil.copy('Info.plist',join(active,'Resources'))
|
||||
|
||||
# Mapnik Headers
|
||||
sym(join(active,'unix/include'),join(active,'Headers'))
|
||||
sym(join(active,'Headers'),join(framework,'Headers'))
|
||||
if INCLUDE_HEADERS:
|
||||
sym(join(active,'unix/include'),join(active,'Headers'))
|
||||
sym(join(active,'Headers'),join(framework,'Headers'))
|
||||
else:
|
||||
# purge the installed headers of mapnik
|
||||
os.system('rm -rf %s' % join(active,'unix/include'))
|
||||
|
||||
# Programs
|
||||
sym(join(active,'unix/bin'),join(active,'Programs'))
|
||||
|
|
Loading…
Add table
Reference in a new issue