source: pacpusframework/trunk/scripts/build-msvc.bat@ 12

Last change on this file since 12 was 4, checked in by sgosseli, 12 years ago

Provide a script to easily build Pacpus on Windows.

File size: 1.2 KB
Line 
1@echo off
2echo ========================================
3echo PACPUS BUILD MSVC
4echo ========================================
5echo:
6
7:preamble
8Rem Check the args
9if "%1" == "" goto usage
10Rem Check if the user is in the build directory
11if not exist "%CD%\..\README.txt" goto usage
12Rem Args ok, go to build
13goto build
14
15:usage
16echo Usage:
17echo build-msvc.bat [install_dir]
18echo The script must be run in the build directory, which is 'trunk\build'
19echo:
20echo Where:
21echo install_dir is the installation directory of the library
22echo:
23echo For instance, here is how to build Pacpus:
24echo ..\scripts\build-msvc.bat "D:\Libraries\Pacpus"
25echo:
26goto exit
27
28:build
29Rem Root of the repository
30set root_dir=%CD%\..
31Rem Initialize the environment of log4cxx
32set LOG4CXX_ROOT=%root_dir%\3rd\apache-log4cxx
33Rem Initialize the build
34cmake .. -DPACPUS_INSTALL_DIR="%1" -DPACPUS_INSTALL_3RD=TRUE -DPACPUS_USE_LOG=TRUE
35Rem Build in debug and release
36msbuild Pacpus.sln /p:Configuration=Debug
37msbuild Pacpus.sln /p:Configuration=Release
38Rem Install
39msbuild INSTALL.vcxproj /p:Configuration=Debug
40msbuild INSTALL.vcxproj /p:Configuration=Release
41echo Build finished, do not forget to check the MSVC's output
42
43:exit
44pause
Note: See TracBrowser for help on using the repository browser.