working on openjpeg

This commit is contained in:
wiredfool 2014-06-11 05:22:28 +00:00
parent 64efea9ed8
commit 7a1563576e

View File

@ -78,6 +78,22 @@ def end_compiler():
endlocal endlocal
""" """
def nmake_openjpeg(compiler):
return r"""
rem build openjpeg
setlocal
@echo on
cd /D %%OPENJPEG%%
nmake -f Makefile clean
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON -G "NMake Makefiles" .
nmake -f Makefile
copy /Y /B bin/* %%INCLIB%%
mkdir %%INCLIB%%/openjpeg-2.0
copy /Y /B src/lib/openjp2/openjpeg.h %%INCLIB%%/openjpeg-2.0
copy /Y /B src/lib/openjp2/opj_stdint.h %%INCLIB%%/openjpeg-2.0
endlocal
""" % compiler
def nmake_libs(compiler): def nmake_libs(compiler):
# undone -- pre, makes, headers, libs # undone -- pre, makes, headers, libs
return r""" return r"""
@ -116,12 +132,13 @@ endlocal
rem build openjpeg rem build openjpeg
setlocal setlocal
cd /D %%OPENJPEG%% cd /D %%OPENJPEG%%
%%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON . %%CMAKE%% -DBUILD_THIRDPARTY:BOOL=ON -G "NMake Makefiles" .
nmake -f Makefile.vc clean nmake -f Makefile clean
nmake -f Makefile.vc nmake -f Makefile
copy /Y /B bin/* %%INCLIB%% copy /Y /B bin/* %%INCLIB%%
copy /Y /B src/lib/openjp2/openjpeg.h %%INCLIB%% mkdir %%INCLIB%%/openjpeg-2.0
copy /Y /B src/lib/openjp2/opj_stdint.h %%INCLIB%% copy /Y /B src/lib/openjp2/openjpeg.h %%INCLIB%%/openjpeg-2.0
copy /Y /B src/lib/openjp2/opj_stdint.h %%INCLIB%%/openjpeg-2.0
endlocal endlocal
rem Build libtiff rem Build libtiff
@ -169,14 +186,15 @@ endlocal
mkdirs() mkdirs()
fetch_libs() fetch_libs()
script = [header(), cp_tk()] script = [header()] #, cp_tk()]
for compiler in compilers.values(): for compiler in compilers.values():
#if True: #if True:
# compiler = compilers[(7,64)] # compiler = compilers[(7,64)]
script.append(setup_compiler(compiler)) script.append(setup_compiler(compiler))
script.append(nmake_libs(compiler)) # script.append(nmake_libs(compiler))
script.append(msbuild_libs(compiler)) script.append(nmake_openjpeg(compiler))
# script.append(msbuild_libs(compiler))
script.append(end_compiler()) script.append(end_compiler())
with open('build_deps.cmd', 'w') as f: with open('build_deps.cmd', 'w') as f: