[162] | 1 | @echo off
|
---|
| 2 |
|
---|
| 3 | echo #################################################
|
---|
| 4 | echo # ___________ ____ ______ __ __ _____ #
|
---|
| 5 | echo # \____ \__ \ _/ ___\\____ \^| ^| \/ ___/ #
|
---|
| 6 | echo # ^| ^|_^> ^> __ \\ \___^| ^|_^> ^> ^| /\___ \ #
|
---|
| 7 | echo # ^| __(____ /\___ ^> __/^|____//____ ^> #
|
---|
| 8 | echo # ^|__^| \/ \/^|__^| \/ #
|
---|
| 9 | echo # #
|
---|
| 10 | echo #################################################
|
---|
| 11 | echo:
|
---|
| 12 |
|
---|
| 13 | echo ========================================
|
---|
| 14 | echo PACPUS BUILD MSVC
|
---|
| 15 | echo ========================================
|
---|
| 16 | echo:
|
---|
| 17 |
|
---|
| 18 | :preamble
|
---|
| 19 | :: Check if the user is in the build directory
|
---|
| 20 | if not exist "%CD%\..\README.txt" goto usage
|
---|
| 21 | :: Args ok, go to build
|
---|
| 22 | goto build
|
---|
| 23 |
|
---|
| 24 | :usage
|
---|
| 25 | echo Usage:
|
---|
| 26 | echo build-msvc.bat [install_dir]
|
---|
| 27 | echo [install-dir] is optional
|
---|
| 28 | echo The script must be run in the build directory, which is 'trunk\build'
|
---|
| 29 | echo:
|
---|
| 30 | echo Where:
|
---|
| 31 | echo install_dir is the installation directory of the library
|
---|
| 32 | echo:
|
---|
| 33 | echo For instance, here is how to build Pacpus:
|
---|
| 34 | echo ..\scripts\build-msvc.bat "D:\Libraries\Pacpus"
|
---|
| 35 | echo:
|
---|
| 36 | goto exit
|
---|
| 37 |
|
---|
| 38 | :build
|
---|
| 39 | :: Initialize the build
|
---|
| 40 | cmake .. -DPACPUS_INSTALL_3RD=TRUE -DPACPUS_USE_LOG=TRUE -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE
|
---|
| 41 | :: Build in debug and release
|
---|
[344] | 42 | REM msbuild Pacpus.sln /p:Configuration=Debug
|
---|
| 43 | REM msbuild Pacpus.sln /p:Configuration=Release
|
---|
[162] | 44 | :: Install
|
---|
[344] | 45 | REM msbuild INSTALL.vcxproj /p:Configuration=Debug
|
---|
| 46 | REM msbuild INSTALL.vcxproj /p:Configuration=Release
|
---|
| 47 | REM echo Build finished, do not forget to check the MSVC's output
|
---|
[162] | 48 |
|
---|
| 49 | :exit
|
---|
| 50 | pause |
---|