Windows.bat 3.14 KB
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2
git submodule init
git submodule update --remote
Jan Möbius's avatar
Jan Möbius committed
3

Jan Möbius's avatar
Jan Möbius committed
4 5

:: set up Libraty Paths
Jan Möbius's avatar
Jan Möbius committed
6 7
set LIBPATH_BASE=E:/libs/%COMPILER%
set CMAKE_WINDOWS_LIBS_DIR=E:/libs
Jan Möbius's avatar
Jan Möbius committed
8 9


Jan Möbius's avatar
Jan Möbius committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
mkdir rel
cd rel

IF "%ARCHITECTURE%" == "x64" (
  set ARCH_VS= Win64
  set STRING_ARCH=64-Bit
) else (
  set ARCH_VS=
  set STRING_ARCH=32-Bit
)


IF "%QT_VERSION%" == "Qt5.3.1" (
 set QT_REV=5.3
 set QT_SUFFIX=_opengl
)

IF "%QT_VERSION%" == "Qt5.5.1" (
 set QT_REV=5.5
 set QT_SUFFIX=
)

Martin Schultz's avatar
Martin Schultz committed
32 33 34 35 36
IF "%QT_VERSION%" == "Qt5.10.1" (
 set QT_REV=5.10.1
 set QT_SUFFIX=
)

Jan Möbius's avatar
Jan Möbius committed
37 38

IF "%BUILD_PLATFORM%" == "VS2013" (
Jan Möbius's avatar
Jan Möbius committed
39
    set LIBPATH=E:/libs/VS2013
Jan Möbius's avatar
Jan Möbius committed
40 41 42 43
    set GTESTVERSION=gtest-1.6.0
    set GENERATOR=Visual Studio 12%ARCH_VS%
    set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
    IF "%ARCHITECTURE%" == "x64" (
schultz's avatar
schultz committed
44
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\%QT_VERSION%-vs2013-%STRING_ARCH%\%QT_REV%\msvc2013_64%QT_SUFFIX% 
Jan Möbius's avatar
Jan Möbius committed
45 46 47
    )

    IF "%ARCHITECTURE%" == "x32" (
schultz's avatar
schultz committed
48
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\%QT_VERSION%-vs2013-%STRING_ARCH%\%QT_REV%\msvc2013%QT_SUFFIX%
Jan Möbius's avatar
Jan Möbius committed
49 50 51
    )

    SET BOOST_ROOT=
52
    set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DBOOST_ROOT="%LIBPATH_BASE%/%ARCHITECTURE%/boost_1_59_0" -DBOOST_LIBRARYDIR="%LIBPATH_BASE%/%ARCHITECTURE%/boost_1_59_0/lib64-msvc-12.0"
Jan Möbius's avatar
Jan Möbius committed
53 54 55
) 

IF "%BUILD_PLATFORM%" == "VS2015" (
Jan Möbius's avatar
Jan Möbius committed
56
    set LIBPATH=E:/libs/VS2015
Jan Möbius's avatar
Jan Möbius committed
57 58 59 60 61 62
    set GTESTVERSION=gtest-1.7.0
    set GENERATOR=Visual Studio 14%ARCH_VS%
    set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
    set QT_BASE_CONFIG=TODO
) 

Martin Schultz's avatar
Martin Schultz committed
63 64 65 66 67
IF "%BUILD_PLATFORM%" == "VS2017" (
    set LIBPATH=E:/libs/VS2017
    set GTESTVERSION=gtest-1.7.0
    set GENERATOR=Visual Studio 15%ARCH_VS%
    set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com"
schultz's avatar
schultz committed
68
    set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt%QT_REV%\%QT_REV%\msvc2017_64%QT_SUFFIX% 
69
    
70
    set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DBOOST_ROOT="%LIBPATH_BASE%/%ARCHITECTURE%/boost_1_67_0" -DBOOST_LIBRARYDIR="%LIBPATH_BASE%/%ARCHITECTURE%/boost_1_67_0/lib64-msvc-14.1"
Martin Schultz's avatar
Martin Schultz committed
71 72
)

Jan Möbius's avatar
Jan Möbius committed
73 74 75 76 77 78 79 80 81
ECHO "============================================================="
ECHO "============================================================="
ECHO "Building with :"
ECHO "ARCHITECTURE        : %ARCHITECTURE%"
ECHO "BUILD_PLATFORM      : %BUILD_PLATFORM%"
ECHO "GTESTVERSION        : %GTESTVERSION%"
ECHO "GENERATOR           : %GENERATOR%"
ECHO "VS_PATH             : %VS_PATH%"
ECHO "LIBPATH             : %LIBPATH%"
82
ECHO "LIBPATH_BASE        : %LIBPATH_BASE%"
Jan Möbius's avatar
Jan Möbius committed
83 84 85 86 87 88
ECHO "QT_INSTALL_PATH     : %QT_INSTALL_PATH%"
ECHO "QT_INSTALL_PATH     : %QT_BASE_CONFIG%"
ECHO "CMAKE_CONFIGURATION : %CMAKE_CONFIGURATION%"
ECHO "============================================================="
ECHO "============================================================="

Max Lyon's avatar
Max Lyon committed
89
"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%"  -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DCMAKE_WINDOWS_LIBS_DIR=%CMAKE_WINDOWS_LIBS_DIR% %CMAKE_CONFIGURATION% ..
Jan Möbius's avatar
Jan Möbius committed
90 91 92 93 94 95 96 97

IF %errorlevel% NEQ 0 exit /b %errorlevel%


%VS_PATH% /Build "Release" CoMISo.sln /Project "ALL_BUILD"

IF %errorlevel% NEQ 0 exit /b %errorlevel%