blob: c1b956c5c029a3cf130f07c8db3075dc739ccd47 [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
James E. King, III33df4eb2017-04-06 08:45:17 -040043: PLATFORM is x64 or x86, but we want x86 to become "32" when we strip it down for paths:
44SET NORM_PLATFORM=%PLATFORM:~-2,2%
45IF "%NORM_PLATFORM%" == "86" (SET NORM_PLATFORM=32)
46
James E. King, III07f59972017-03-10 06:18:33 -050047SET BOOST_ROOT=C:\Libraries\boost_%BOOST_VERSION:.=_%
James E. King, III33df4eb2017-04-06 08:45:17 -040048SET BOOST_LIBRARYDIR=%BOOST_ROOT%\lib%NORM_PLATFORM%-msvc-%COMPILER:~-3,2%.0
49SET OPENSSL_ROOT=C:\OpenSSL-Win%NORM_PLATFORM%
James E. King, III07f59972017-03-10 06:18:33 -050050SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty
James E. King, III33df4eb2017-04-06 08:45:17 -040051
52:: MSVC2010 doesn't "do" std::thread
53IF "%COMPILER%" == "vc100" (
54 SET THREADMODEL=BOOST
55) ELSE (
56 SET THREADMODEL=STD
57)
58
James E. King, III07f59972017-03-10 06:18:33 -050059IF "%PYTHON_VERSION%" == "" (
60 SET WITH_PYTHON=OFF
61) ELSE (
62 SET WITH_PYTHON=ON
63 SET PATH=C:\Python%PYTHON_VERSION:.=%\scripts;C:\Python%PYTHON_VERSION:.=%;!PATH!
64)
James E. King, III33df4eb2017-04-06 08:45:17 -040065IF "%CONFIGURATION%" == "Debug" (SET ZLIB_LIB_SUFFIX=d)
James E. King, III07f59972017-03-10 06:18:33 -050066
67IF NOT "%QT_VERSION%" == "" (
68 IF /i "%PLATFORM%" == "x64" SET QTEXT=_64
69 SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH!
70)
71
72IF NOT "%PROFILE:~0,4%" == "MSVC" (
73
74 SET BASH=C:\msys64\usr\bin\bash.exe
75 SET BOOST_ROOT=
76 SET BOOST_INCLUDEDIR=/mingw64/include
77 SET BOOST_LIBRARYDIR=/mingw64/lib
78 SET OPENSSL_LIBRARIES=/mingw64/lib
79 SET OPENSSL_ROOT=/mingw64
80 SET WIN3P=
81
82 !BASH! -lc "sed -i '/export PATH=\/mingw64\/bin/d' ~/.bash_profile && echo 'export PATH=/mingw64/bin:$PATH' >> ~/.bash_profile" || EXIT /B
83
84)
85
86SET BUILDDIR_MSYS=%BUILDDIR:\=/%
87SET BUILDDIR_MSYS=/c%BUILDDIR_MSYS:~2%
88SET INSTDIR_MSYS=%INSTDIR:\=/%
89SET INSTDIR_MSYS=/c%INSTDIR_MSYS:~2%
90SET SRCDIR_MSYS=%SRCDIR:\=/%
91SET SRCDIR_MSYS=/c%SRCDIR_MSYS:~2%