forked from fpoussin/QtUsb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_msvc2017.bat
48 lines (38 loc) · 987 Bytes
/
build_msvc2017.bat
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@echo off
setlocal
IF "%1"=="" (
echo "Missing architecture [x86|x64]"
pause
exit /b 1c
)
IF "%2"=="" (
echo "Missing QT path ie: C:\Qt\5.12.2\msvc2017"
pause
exit /b 1c
)
SET ARCH=%1
SET QTDIR=%2
SET BUILDTOOL=jom
SET vcarch=%ARCH%
SET usbarch=%ARCH%
IF "%ARCH%" == "x64" SET vcarch=amd64
IF "%ARCH%" == "x86" SET usbarch=Win32
CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %vcarch%
SET PATH=%QTDIR%\bin;C:\Qt\Tools\QtCreator\bin;%PATH%
WHERE /Q jom
IF %errorlevel% NEQ 0 set BUILDTOOL=nmake
git submodule update --init --recursive
CD libusb
msbuild msvc\libusb_static_2017.vcxproj /p:Configuration=Release
msbuild msvc\libusb_static_2017.vcxproj /p:Configuration=Debug
COPY %usbarch%\Release\lib\libusb-1.0.lib ..\libusb-1.0.lib
COPY %usbarch%\Debug\lib\libusb-1.0.lib ..\libusb-1.0d.lib
CD ..
RMDIR /S /Q build
MKDIR build
CD build
qmake ..
%BUILDTOOL% install sub-tests
CD tests\auto
nmake check
endlocal