mirror of
https://github.com/simh/simh.git
synced 2026-01-25 19:56:25 +00:00
Visual Studio Projects: Added support for separate libpng libraries based on the available C runtime library for the compiler used to build.
This commit is contained in:
@@ -152,8 +152,8 @@ if not exist ../../windows-build/pthreads/pthread.h goto _notice1
|
||||
findstr "/c:_MSC_VER >= 1900" ..\..\windows-build\pthreads\pthread.h >NUL
|
||||
if ERRORLEVEL 1 goto _notice2
|
||||
if "%_X_LIBSDL%" == "" goto _done_libsdl
|
||||
if not exist ../../windows-build/libpng* goto _notice2
|
||||
if not exist ../../windows-build/libSDL/SDL2-2.0.3/include/SDL.h goto _notice2
|
||||
if not exist "..\..\windows-build\libpng-1.6.18\projects\vstudio\Release Library\*" goto _notice2
|
||||
if not exist "../../windows-build/libSDL/Microsoft DirectX SDK (June 2010)/Lib/x86/dxguid.lib" goto _notice2
|
||||
findstr "/c:HAVE_FTOL2_SSE" ..\..\windows-build\libSDL\SDL2-2.0.3\VisualC\SDL_Static\SDL_VS2008.vcproj >NUL
|
||||
if ERRORLEVEL 1 goto _notice2
|
||||
@@ -178,6 +178,26 @@ echo Found: %FONTFILE%
|
||||
move /Y %_X_FontIncludeName%.temp %_X_FontIncludeName% >NUL
|
||||
:_done_findfont
|
||||
if exist %_X_FontIncludeName%.temp del %_X_FontIncludeName%.temp
|
||||
call :FindVCVersion _VC_VER
|
||||
if not exist "..\..\windows-build\libpng-1.6.18\projects\Release Library" goto _setup_library
|
||||
if not exist "..\..\windows-build\libpng-1.6.18\projects\Release Library\VisualC.version" set _LIB_VC_VER=9
|
||||
if exist "..\..\windows-build\libpng-1.6.18\projects\Release Library\VisualC.version" for /f "delims=." %%v in ("..\..\windows-build\libpng-1.6.18\projects\Release Library\VisualC.version") do set _LIB_VC_VER=%%v
|
||||
if %_LIB_VC_VER% EQU %_VC_VER% goto _done_library
|
||||
if %_VC_VER% GEQ 14 goto _check_new_library
|
||||
if %_LIB_VC_VER% LSS 14 goto _done_library
|
||||
goto _setup_library
|
||||
:_check_new_library
|
||||
if %_LIB_VC_VER% GEQ 14 godo _done_library
|
||||
:_setup_library
|
||||
if %_VC_VER% LSS 14 set _VCLIB_DIR_=vstudio 2008
|
||||
if %_VC_VER% GEQ 14 set _VCLIB_DIR_=vstudio
|
||||
if exist "..\..\windows-build\libpng-1.6.18\projects\Release Library" rmdir/s/q "..\..\windows-build\libpng-1.6.18\projects\Release Library"
|
||||
if exist "..\..\windows-build\libpng-1.6.18\projects\Debug Library" rmdir/s/q "..\..\windows-build\libpng-1.6.18\projects\Debug Library"
|
||||
xcopy /S /I "..\..\windows-build\libpng-1.6.18\projects\%_VCLIB_DIR_%\Release Library\*" "..\..\windows-build\libpng-1.6.18\projects\Release Library\" > NUL 2>&1
|
||||
xcopy /S /I "..\..\windows-build\libpng-1.6.18\projects\%_VCLIB_DIR_%\Debug Library\*" "..\..\windows-build\libpng-1.6.18\projects\Debug Library\" > NUL 2>&1
|
||||
set _VCLIB_DIR_=
|
||||
set _LIB_VC_VER=
|
||||
:_done_library
|
||||
goto _done_build
|
||||
:_notice1
|
||||
echo *****************************************************
|
||||
@@ -252,3 +272,28 @@ goto :EOF
|
||||
:WhereInPath
|
||||
if "%~$PATH:1" NEQ "" exit /B 0
|
||||
exit /B 1
|
||||
|
||||
:WhichInPath
|
||||
if "%~$PATH:1" EQU "" exit /B 1
|
||||
set %2=%~$PATH:1
|
||||
exit /B 0
|
||||
|
||||
:FindVCVersion
|
||||
call :WhichInPath cl.exe _VC_CL_
|
||||
for /f "tokens=2-8 delims=\" %%a in ("%_VC_CL_%") do call :VCCheck _VC_VER_NUM_ "%%a" "%%b" "%%c" "%%d" "%%e" "%%f" "%%g"
|
||||
for /f "delims=." %%a in ("%_VC_VER_NUM_%") do set %1=%%a
|
||||
set _VC_CL=
|
||||
exit /B 0
|
||||
|
||||
:VCCheck
|
||||
set _VC_TMP=%1
|
||||
:_VCCheck_Next
|
||||
shift
|
||||
set _VC_TMP_=%~1
|
||||
if "%_VC_TMP_%" equ "" goto _VCCheck_Done
|
||||
if "%_VC_TMP_:~0,24%" EQU "Microsoft Visual Studio " set %_VC_TMP%=%_VC_TMP_:Microsoft Visual Studio =%
|
||||
goto _VCCheck_Next
|
||||
:_VCCheck_Done
|
||||
set _VC_TMP_=
|
||||
set _VC_TMP=
|
||||
exit /B 0
|
||||
|
||||
Reference in New Issue
Block a user