From 7cda3aba38b64d7752f775ad5e7cb82a634d097d Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sat, 21 Nov 2020 16:39:52 +0100 Subject: [PATCH] Minor win build changes --- CMakeLists.txt | 6 +++++- build/win64/build-me.bat | 25 ++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3618275..6acfd72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -394,7 +394,11 @@ install(TARGETS ${name} LIBRARY DESTINATION ${LIB_INSTALL_DIR} ) install( FILES ${HFILES} DESTINATION ${INCLUDE_INSTALL_DIR} ) - +if(MSVC) + # install(FILES $ DESTINATION lib OPTIONAL) + INSTALL(FILES ${PROJECT_BINARY_DIR}/${name}.dir/Debug/${name}.pdb + DESTINATION lib CONFIGURATIONS Debug ) +endif() #------------------------------------------------------------------------ # Dynamic Library diff --git a/build/win64/build-me.bat b/build/win64/build-me.bat index 659aeaa..d29a732 100644 --- a/build/win64/build-me.bat +++ b/build/win64/build-me.bat @@ -9,7 +9,7 @@ @set DOPAUSE=1 @set TMPGEN=Visual Studio 16 2019 @set TMPBR=next -@set TMPINDBG=0 +@set TMPINDBG=1 @set TMPOPTS=-G "%TMPGEN%" -A x64 @set TMPOPTS=%TMPOPTS% -DCMAKE_INSTALL_PREFIX=%TMPINS% @@ -29,6 +29,7 @@ @call chkmsvc %TMPPRJ% @if "%TMPBR%x" == "x" goto DNBR @call chkbranch %TMPBR% +@if ERRORLEVEL 1 goto BAD_BR :DNBR @echo Build %TMPPRJ% 64-bits %DATE% %TIME%, in %CD%, to %TMPLOG% > %TMPLOG% @@ -98,16 +99,26 @@ @echo Proceeding with INSTALL... @echo. @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' >> %TMPLOG% 2>&1 @cmake --build . --config Debug --target INSTALL >> %TMPLOG% 2>&1 @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 +@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' >> %TMPLOG% 2>&1 @cmake --build . --config Release --target INSTALL >> %TMPLOG% 2>&1 @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% @@ -116,6 +127,18 @@ @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 @echo. @echo No install at this time, but there may be an updexe.bat to copy the EXE to c:\MDOS...