Minor win build changes

This commit is contained in:
Geoff McLane 2020-11-21 16:39:52 +01:00
parent a2967d0699
commit 7cda3aba38
2 changed files with 29 additions and 2 deletions

View file

@ -394,7 +394,11 @@ install(TARGETS ${name}
LIBRARY DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
) )
install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} )
if(MSVC)
# install(FILES $<TARGET_PDB_FILE:${name}> DESTINATION lib OPTIONAL)
INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb
DESTINATION lib CONFIGURATIONS Debug )
endif()
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# Dynamic Library # Dynamic Library

View file

@ -9,7 +9,7 @@
@set DOPAUSE=1 @set DOPAUSE=1
@set TMPGEN=Visual Studio 16 2019 @set TMPGEN=Visual Studio 16 2019
@set TMPBR=next @set TMPBR=next
@set TMPINDBG=0 @set TMPINDBG=1
@set TMPOPTS=-G "%TMPGEN%" -A x64 @set TMPOPTS=-G "%TMPGEN%" -A x64
@set TMPOPTS=%TMPOPTS% -DCMAKE_INSTALL_PREFIX=%TMPINS% @set TMPOPTS=%TMPOPTS% -DCMAKE_INSTALL_PREFIX=%TMPINS%
@ -29,6 +29,7 @@
@call chkmsvc %TMPPRJ% @call chkmsvc %TMPPRJ%
@if "%TMPBR%x" == "x" goto DNBR @if "%TMPBR%x" == "x" goto DNBR
@call chkbranch %TMPBR% @call chkbranch %TMPBR%
@if ERRORLEVEL 1 goto BAD_BR
:DNBR :DNBR
@echo Build %TMPPRJ% 64-bits %DATE% %TIME%, in %CD%, to %TMPLOG% > %TMPLOG% @echo Build %TMPPRJ% 64-bits %DATE% %TIME%, in %CD%, to %TMPLOG% > %TMPLOG%
@ -98,16 +99,26 @@
@echo Proceeding with INSTALL... @echo Proceeding with INSTALL...
@echo. @echo.
@if NOT "%TMPINDBG%x" == "1x" goto DNDBGIN @if NOT "%TMPINDBG%x" == "1x" goto DNDBGIN
@if EXIST install_manifest.txt @del install_manifest.txt
@echo Doing: 'cmake --build . --config Debug --target INSTALL' @echo Doing: 'cmake --build . --config Debug --target INSTALL'
@echo Doing: 'cmake --build . --config Debug --target INSTALL' >> %TMPLOG% 2>&1 @echo Doing: 'cmake --build . --config Debug --target INSTALL' >> %TMPLOG% 2>&1
@cmake --build . --config Debug --target INSTALL >> %TMPLOG% 2>&1 @cmake --build . --config Debug --target INSTALL >> %TMPLOG% 2>&1
@if ERRORLEVEL 1 goto ERR4 @if ERRORLEVEL 1 goto ERR4
@if EXIST install_manifest.txt (
@copy install_manifest.txt install_manifest_debug.txt >nul
@call add2installs install_manifest.txt -o %TMPINS%\install_manifest.txt >> %TMPLOG%
)
:DNDBGIN :DNDBGIN
@if EXIST install_manifest.txt @del install_manifest.txt
@echo Doing: 'cmake --build . --config Release --target INSTALL' @echo Doing: 'cmake --build . --config Release --target INSTALL'
@echo Doing: 'cmake --build . --config Release --target INSTALL' >> %TMPLOG% 2>&1 @echo Doing: 'cmake --build . --config Release --target INSTALL' >> %TMPLOG% 2>&1
@cmake --build . --config Release --target INSTALL >> %TMPLOG% 2>&1 @cmake --build . --config Release --target INSTALL >> %TMPLOG% 2>&1
@if ERRORLEVEL 1 goto ERR5 @if ERRORLEVEL 1 goto ERR5
@if EXIST install_manifest.txt (
@copy install_manifest.txt install_manifest_release.txt >nul
@call add2installs install_manifest.txt -o %TMPINS%\install_manifest.txt >> %TMPLOG%
)
@fa4 " -- " %TMPLOG% @fa4 " -- " %TMPLOG%
@ -116,6 +127,18 @@
@goto END @goto END
:BAD_BR
@echo Try to do 'git checkout %TMPBR%'
@git checkout %TMPBR% >> %TMPLOG% 2>&1
@call chkbranch %TMPBR%
@if ERRORLEVEL 1 goto NO_BR
@goto DNBR
:NO_BR
@echo.
@echo Unable to check out %TMPBR%! *** FIX ME ***
@echo.
@goto ISERR
:GOTNO :GOTNO
@echo. @echo.
@echo No install at this time, but there may be an updexe.bat to copy the EXE to c:\MDOS... @echo No install at this time, but there may be an updexe.bat to copy the EXE to c:\MDOS...