blob: d907d5ebd445c393e2d4210c264a23041834e7da [file] [log] [blame]
James E. King, III07f59972017-03-10 06:18:33 -05001::
2:: Licensed under the Apache License, Version 2.0 (the "License");
3:: you may not use this file except in compliance with the License.
4:: You may obtain a copy of the License at
5::
6:: http://www.apache.org/licenses/LICENSE-2.0
7::
8:: Unless required by applicable law or agreed to in writing, software
9:: distributed under the License is distributed on an "AS IS" BASIS,
10:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11:: See the License for the specific language governing permissions and
12:: limitations under the License.
13::
14
15 IF "%PROFILE%" == "MSVC2010" (
16 CALL "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" %PLATFORM%
17) ELSE IF "%PROFILE%" == "MSVC2012" (
18 CALL "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" %PLATFORM%
19) ELSE IF "%PROFILE%" == "MSVC2013" (
20 CALL "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %PLATFORM%
21) ELSE IF "%PROFILE%" == "MSVC2015" (
22 CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
23) ELSE IF "%PROFILE%" == "MSVC2017" (
24 CALL "C:\Program Files (x86)\Microsoft Visual Studio 15.0\VC\vcvarsall.bat" %PLATFORM%
25) ELSE IF "%PROFILE%" == "MINGW" (
26 SET MSYS2_PATH_TYPE=stock
27) ELSE IF "%PROFILE%" == "MSYS" (
28 SET MSYS2_PATH_TYPE=stock
29) ELSE (
30 ECHO Unsupported PROFILE=%PROFILE% or PLATFORM=%PLATFORM%
31 EXIT /B 1
32)
33
34CALL cl_setcompiler.bat || EXIT /B
35CALL cl_setgenerator.bat || EXIT /B
36
37SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor
38SET BUILDCACHE=%APPVEYOR_BUILD_FOLDER%\buildcache
39SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-build
40SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-inst
41SET SRCDIR=%APPVEYOR_BUILD_FOLDER%
42
43SET BOOST_ROOT=C:\Libraries\boost_%BOOST_VERSION:.=_%
44SET BOOST_LIBRARYDIR=%BOOST_ROOT%\lib%PLATFORM:~-2,2%-msvc-%COMPILER:~-3,2%.0
45SET OPENSSL_ROOT=C:\OpenSSL-Win%PLATFORM:~-2,2%
46SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
47IF "%PYTHON_VERSION%" == "" (
48 SET WITH_PYTHON=OFF
49) ELSE (
50 SET WITH_PYTHON=ON
51 SET PATH=C:\Python%PYTHON_VERSION:.=%\scripts;C:\Python%PYTHON_VERSION:.=%;!PATH!
52)
53IF "%CONFIGURATION%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d)
54
55IF NOT "%QT_VERSION%" == "" (
56 IF /i "%PLATFORM%" == "x64" SET QTEXT=_64
57 SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
58)
59
60IF NOT "%PROFILE:~0,4%" == "MSVC" (
61
62 SET BASH=C:\msys64\usr\bin\bash.exe
63 SET BOOST_ROOT=
64 SET BOOST_INCLUDEDIR=/mingw64/include
65 SET BOOST_LIBRARYDIR=/mingw64/lib
66 SET OPENSSL_LIBRARIES=/mingw64/lib
67 SET OPENSSL_ROOT=/mingw64
68 SET WIN3P=
69
70 !BASH! -lc "sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw64/bin:$PATH' >> ~/.bash_profile" || EXIT /B
71
72)
73
74SET BUILDDIR_MSYS=%BUILDDIR:\=/%
75SET BUILDDIR_MSYS=/c%BUILDDIR_MSYS:~2%
76SET INSTDIR_MSYS=%INSTDIR:\=/%
77SET INSTDIR_MSYS=/c%INSTDIR_MSYS:~2%
78SET SRCDIR_MSYS=%SRCDIR:\=/%
79SET SRCDIR_MSYS=/c%SRCDIR_MSYS:~2%