James E. King, III | 07f5997 | 2017-03-10 06:18:33 -0500 | [diff] [blame^] | 1 | :: |
| 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 | |
| 34 | CALL cl_setcompiler.bat || EXIT /B |
| 35 | CALL cl_setgenerator.bat || EXIT /B |
| 36 | |
| 37 | SET APPVEYOR_SCRIPTS=%APPVEYOR_BUILD_FOLDER%\build\appveyor |
| 38 | SET BUILDCACHE=%APPVEYOR_BUILD_FOLDER%\buildcache |
| 39 | SET BUILDDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-build |
| 40 | SET INSTDIR=%APPVEYOR_BUILD_FOLDER%\local-thrift-inst |
| 41 | SET SRCDIR=%APPVEYOR_BUILD_FOLDER% |
| 42 | |
| 43 | SET BOOST_ROOT=C:\Libraries\boost_%BOOST_VERSION:.=_% |
| 44 | SET BOOST_LIBRARYDIR=%BOOST_ROOT%\lib%PLATFORM:~-2,2%-msvc-%COMPILER:~-3,2%.0 |
| 45 | SET OPENSSL_ROOT=C:\OpenSSL-Win%PLATFORM:~-2,2% |
| 46 | SET WIN3P=%APPVEYOR_BUILD_FOLDER%\thirdparty |
| 47 | IF "%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 | ) |
| 53 | IF "%CONFIGURATION%" == "Debug" (SET ZLIB_STATIC_SUFFIX=d) |
| 54 | |
| 55 | IF NOT "%QT_VERSION%" == "" ( |
| 56 | IF /i "%PLATFORM%" == "x64" SET QTEXT=_64 |
| 57 | SET PATH=C:\Qt\%QT_VERSION%\%PROFILE%!QTEXT!\bin;!PATH! |
| 58 | ) |
| 59 | |
| 60 | IF 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 | |
| 74 | SET BUILDDIR_MSYS=%BUILDDIR:\=/% |
| 75 | SET BUILDDIR_MSYS=/c%BUILDDIR_MSYS:~2% |
| 76 | SET INSTDIR_MSYS=%INSTDIR:\=/% |
| 77 | SET INSTDIR_MSYS=/c%INSTDIR_MSYS:~2% |
| 78 | SET SRCDIR_MSYS=%SRCDIR:\=/% |
| 79 | SET SRCDIR_MSYS=/c%SRCDIR_MSYS:~2% |