-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Windows build script and documents
- Loading branch information
1 parent
87745f2
commit 4adbc8b
Showing
5 changed files
with
45 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,51 @@ | ||
@echo off | ||
cd %~dp0 | ||
|
||
if "%VCPKG_ROOT_DIR%"=="" set "VCPKG_ROOT_DIR=../../vcpkg" | ||
|
||
:select_action | ||
if "%1" == "" goto usage | ||
if /i %1 == win64 goto make_win64 | ||
if /i %1 == xp goto make_xp | ||
if /i %1 == win32 goto make_win32 | ||
if /i %1 == test goto make_test | ||
if /i %1 == clean goto make_clean | ||
goto usage | ||
|
||
:usage | ||
echo Usage: | ||
echo set LIBEVENT_ROOT_DIR="%appdata%\lib\libevent" | ||
echo set GLOG_ROOT_DIR="%appdata%\lib\glog" | ||
echo set VCPKG_ROOT_DIR="C:/Users/user/source/repos/vcpkg" | ||
echo make win64 | ||
echo make xp | ||
echo make win32 | ||
echo make test | ||
echo make clean | ||
goto :eof | ||
|
||
:make_win64 | ||
md build.win64 | ||
cd build.win64 | ||
cmake -DLIBEVENT_ROOT_DIR="%LIBEVENT_ROOT_DIR%" -DGLOG_ROOT_DIR="%GLOG_ROOT_DIR%" -DPOOLAGENT__STATIC_LINKING_VC_LIB=ON -DPOOLAGENT__USE_GLOG=ON -DPOOLAGENT__GLOG_TO_STDOUT=ON -A x64 .. | ||
cmake -DCMAKE_BUILD_TYPE=Release "-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT_DIR%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DPOOLAGENT__STATIC_LINKING_VC_LIB=ON -DPOOLAGENT__GLOG_TO_STDOUT=ON .. | ||
start PoolAgent.sln | ||
cd .. | ||
goto :eof | ||
|
||
:make_xp | ||
md build.xp | ||
cd build.xp | ||
cmake -DLIBEVENT_ROOT_DIR="%LIBEVENT_ROOT_DIR%" -DGLOG_ROOT_DIR="%GLOG_ROOT_DIR%" -DPOOLAGENT__STATIC_LINKING_VC_LIB=ON -DPOOLAGENT__USE_GLOG=ON -DPOOLAGENT__GLOG_TO_STDOUT=ON -A x86 -T v141_xp .. | ||
:make_win32 | ||
md build.win32 | ||
cd build.win32 | ||
cmake -DCMAKE_BUILD_TYPE=Release "-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT_DIR%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -A Win32 -DPOOLAGENT__STATIC_LINKING_VC_LIB=ON -DPOOLAGENT__GLOG_TO_STDOUT=ON .. | ||
start PoolAgent.sln | ||
cd .. | ||
goto :eof | ||
|
||
:make_test | ||
echo ------ test.win64 | ||
build.win64\Release\unittest | ||
echo ------ test.xp | ||
build.xp\Release\unittest | ||
echo ------ test.win32 | ||
build.win32\Release\unittest | ||
goto :eof | ||
|
||
:make_clean | ||
echo ------ remove build.win64 | ||
rd /s /q build.win64 | ||
echo ------ remove build.xp | ||
rd /s /q build.xp | ||
echo ------ remove build.win32 | ||
rd /s /q build.win32 | ||
goto :eof |