リビジョン | 7923 (tree) |
---|---|
日時 | 2019-08-08 22:10:31 |
作者 | (del#24082) |
libresslを使いビルドできるようにした。
お試しのため、VS2019のプロジェクトファイルのみ修正。
チケット #36876
@@ -1,4 +1,4 @@ | ||
1 | 1 | CALL buildoniguruma6.bat |
2 | 2 | CALL buildzlib.bat |
3 | -CALL buildopenssl.bat | |
3 | +CALL buildlibressl.bat | |
4 | 4 | CALL buildSFMT.bat |
@@ -0,0 +1,86 @@ | ||
1 | +pushd libressl | |
2 | + | |
3 | +SET LIBRESSL_BUILD=FALSE | |
4 | + | |
5 | +IF NOT EXIST crypto\Debug\crypto.lib SET LIBRESSL_BUILD=TRUE | |
6 | +IF NOT EXIST crypto\Release\crypto.lib SET LIBRESSL_BUILD=TRUE | |
7 | + | |
8 | +IF %LIBRESSL_BUILD%==FALSE GOTO build_end | |
9 | + | |
10 | + | |
11 | +if not "%VSINSTALLDIR%" == "" goto vsinstdir | |
12 | + | |
13 | +:check_2013 | |
14 | +if "%VS120COMNTOOLS%" == "" goto check_2015 | |
15 | +if not exist "%VS120COMNTOOLS%\VsDevCmd.bat" goto check_2015 | |
16 | +call "%VS120COMNTOOLS%\VsDevCmd.bat" | |
17 | +goto vs2013 | |
18 | + | |
19 | +:check_2015 | |
20 | +if "%VS140COMNTOOLS%" == "" goto check_2017 | |
21 | +if not exist "%VS140COMNTOOLS%\VsDevCmd.bat" goto check_2017 | |
22 | +call "%VS140COMNTOOLS%\VsDevCmd.bat" | |
23 | +goto vs2015 | |
24 | + | |
25 | +:check_2017 | |
26 | +if "%VS150COMNTOOLS%" == "" goto check_2019 | |
27 | +if not exist "%VS150COMNTOOLS%\VsDevCmd.bat" goto check_2019 | |
28 | +call "%VS150COMNTOOLS%\VsDevCmd.bat" | |
29 | +goto vs2017 | |
30 | + | |
31 | +:check_2019 | |
32 | +if "%VS160COMNTOOLS%" == "" goto novs | |
33 | +if not exist "%VS160COMNTOOLS%\VsDevCmd.bat" goto novs | |
34 | +call "%VS160COMNTOOLS%\VsDevCmd.bat" | |
35 | +goto vs2019 | |
36 | + | |
37 | +:novs | |
38 | +echo "Can't find Visual Studio" | |
39 | +exit /b | |
40 | + | |
41 | +:vsinstdir | |
42 | +rem Visual Studioのバージョン判別 | |
43 | +set VSCMNDIR="%VSINSTALLDIR%\Common7\Tools\" | |
44 | +set VSCMNDIR=%VSCMNDIR:\\=\% | |
45 | + | |
46 | +if /I %VSCMNDIR% EQU "%VS120COMNTOOLS%" goto vs2013 | |
47 | +if /I %VSCMNDIR% EQU "%VS140COMNTOOLS%" goto vs2015 | |
48 | +if /I %VSCMNDIR% EQU "%VS150COMNTOOLS%" goto vs2017 | |
49 | +if /I %VSCMNDIR% EQU "%VS160COMNTOOLS%" goto vs2019 | |
50 | + | |
51 | +echo Unknown Visual Studio version | |
52 | +exit /b | |
53 | + | |
54 | +:vs2013 | |
55 | +set CMAKE_GENERATOR=Visual Studio 12 2013 | |
56 | +goto vsend | |
57 | + | |
58 | +:vs2015 | |
59 | +set CMAKE_GENERATOR=Visual Studio 14 2015 | |
60 | +goto vsend | |
61 | + | |
62 | +:vs2017 | |
63 | +set CMAKE_GENERATOR=Visual Studio 15 2016 | |
64 | +goto vsend | |
65 | + | |
66 | +:vs2019 | |
67 | +set CMAKE_GENERATOR=Visual Studio 16 2019 | |
68 | +goto vsend | |
69 | + | |
70 | +:vsend | |
71 | + | |
72 | + | |
73 | +cmake -G "%CMAKE_GENERATOR%" -A Win32 | |
74 | +perl -pi.bak -e "s/MD/MT/g" CMakeCache.txt | |
75 | +cmake -G "%CMAKE_GENERATOR%" -A Win32 | |
76 | + | |
77 | +:build_debug | |
78 | +IF EXIST crypto\Debug\crypto.lib GOTO build_release | |
79 | +devenv /build Debug LibreSSL.sln /project crypto /projectconfig Debug | |
80 | + | |
81 | +:build_release | |
82 | +IF EXIST crypto\Release\crypto.lib GOTO build_end | |
83 | +devenv /build Release LibreSSL.sln /project crypto /projectconfig Release | |
84 | + | |
85 | +:build_end | |
86 | +popd |