forked from michaellukashov/filecopyex3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_filecopyex3.cmd
31 lines (27 loc) · 1.29 KB
/
build_filecopyex3.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
@setlocal
if "%FAR_VERSION%" == "" ( set "FAR_VERSION=Far3" )
if "%CMAKE_PATH%" == "" ( set "CMAKE_PATH=C:\cmake-2.8" )
if "%MINGW_PATH%" == "" ( set "MINGW_PATH=C:\mingw" )
if "%PROJECT_CONFIG%" == "" ( set "PROJECT_CONFIG=Debug" )
if "%BUILD_GEN%" == "" ( set "BUILD_GEN=NMake Makefiles" )
if "%BUILD_COMPILER%" == "" ( set "BUILD_COMPILER=MinGW" )
if "%BUILD_PROJECT%" == "" ( set "BUILD_PROJECT=FileCopyEx3" )
if "%PROJECT_CONF%" == "" ( set "PROJECT_CONF=x86" )
if "%PROJECT_VARS%" == "" ( set "PROJECT_VARS=" )
set PROJECT_ROOT=%~dp0
if exist "%PROJECT_ROOT%/build" ( rm -rf "%PROJECT_ROOT%/build" > NUL )
set PROJECT_BUIILDDIR=%PROJECT_ROOT%\..\filecopyex3-build
if exist "%PROJECT_BUIILDDIR%" ( rm -rf "%PROJECT_BUIILDDIR%" > NUL )
if not exist "%PROJECT_BUIILDDIR%" ( mkdir "%PROJECT_BUIILDDIR%" > NUL )
cd %PROJECT_BUIILDDIR%
if "%BUILD_COMPILER%" == "MinGW" (
set PATH=%MINGW_PATH%\bin
%CMAKE_PATH%\bin\cmake.exe -D CMAKE_BUILD_TYPE="%PROJECT_CONFIG%" -D CONF=%PROJECT_CONF% -G "%BUILD_GEN%" %PROJECT_ROOT%
mingw32-make.exe -f Makefile
) else (
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" %PROJECT_VARS%
%CMAKE_PATH%\bin\cmake.exe -D CMAKE_BUILD_TYPE="%PROJECT_CONFIG%" -D CONF=%PROJECT_CONF% -G "%BUILD_GEN%" %PROJECT_ROOT%
nmake
)
@endlocal