mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
successful build of openjpeg -- unsuccessful linking
This commit is contained in:
parent
64efea9ed8
commit
81af4bf9d7
|
@ -46,8 +46,16 @@ def extract(src, dest):
|
|||
return untar(src, dest)
|
||||
|
||||
def fetch_libs():
|
||||
for lib in libs.values():
|
||||
extract(check_hash(fetch(lib['url']),lib['hash']),build_dir)
|
||||
for name,lib in libs.items():
|
||||
if name == 'openjpeg':
|
||||
filename = check_hash(fetch(lib['url']),lib['hash'])
|
||||
for compiler in compilers.values():
|
||||
if not os.path.exists(os.path.join(build_dir,lib['dir']+compiler['inc_dir'])):
|
||||
extract(filename, build_dir)
|
||||
os.rename(os.path.join(build_dir,lib['dir']),
|
||||
os.path.join(build_dir,lib['dir']+compiler['inc_dir']))
|
||||
else:
|
||||
extract(check_hash(fetch(lib['url']),lib['hash']),build_dir)
|
||||
|
||||
def cp_tk():
|
||||
return r"""
|
||||
|
@ -78,6 +86,21 @@ def end_compiler():
|
|||
endlocal
|
||||
"""
|
||||
|
||||
def nmake_openjpeg(compiler):
|
||||
return r"""
|
||||
rem build openjpeg
|
||||
setlocal
|
||||
@echo on
|
||||
cd /D %%OPENJPEG%%%(inc_dir)s
|
||||
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON -G "NMake Makefiles" .
|
||||
nmake -f Makefile clean
|
||||
nmake -f Makefile
|
||||
copy /Y /B bin\* %%INCLIB%%
|
||||
mkdir %%INCLIB%%\openjpeg-2.0
|
||||
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-2.0
|
||||
endlocal
|
||||
""" % compiler
|
||||
|
||||
def nmake_libs(compiler):
|
||||
# undone -- pre, makes, headers, libs
|
||||
return r"""
|
||||
|
@ -115,13 +138,13 @@ endlocal
|
|||
|
||||
rem build openjpeg
|
||||
setlocal
|
||||
cd /D %%OPENJPEG%%
|
||||
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON .
|
||||
nmake -f Makefile.vc clean
|
||||
nmake -f Makefile.vc
|
||||
copy /Y /B bin/* %%INCLIB%%
|
||||
copy /Y /B src/lib/openjp2/openjpeg.h %%INCLIB%%
|
||||
copy /Y /B src/lib/openjp2/opj_stdint.h %%INCLIB%%
|
||||
cd /D %%OPENJPEG%%%(inc_dir)s
|
||||
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON -G "NMake Makefiles" .
|
||||
nmake -f Makefile clean
|
||||
nmake -f Makefile
|
||||
copy /Y /B bin\* %%INCLIB%%
|
||||
mkdir %%INCLIB%%\openjpeg-2.0
|
||||
copy /Y /B src\lib\openjp2\*.h %%INCLIB%%\openjpeg-2.0
|
||||
endlocal
|
||||
|
||||
rem Build libtiff
|
||||
|
@ -169,13 +192,14 @@ endlocal
|
|||
mkdirs()
|
||||
fetch_libs()
|
||||
|
||||
script = [header(), cp_tk()]
|
||||
script = [header()] #, cp_tk()]
|
||||
|
||||
for compiler in compilers.values():
|
||||
#if True:
|
||||
# compiler = compilers[(7,64)]
|
||||
script.append(setup_compiler(compiler))
|
||||
script.append(nmake_libs(compiler))
|
||||
# script.append(nmake_openjpeg(compiler))
|
||||
script.append(msbuild_libs(compiler))
|
||||
script.append(end_compiler())
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user