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