Windows.bat 3.65 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
44
45
46
47
48
49
50
51
    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" (
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2013-%STRING_ARCH%\%QT_REV%\msvc2013_64%QT_SUFFIX% 
    )

    IF "%ARCHITECTURE%" == "x32" (
      set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\%QT_VERSION%-vs2013-%STRING_ARCH%\%QT_REV%\msvc2013%QT_SUFFIX%
    )

    SET BOOST_ROOT=
52
    set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%LIBPATH%\%ARCHITECTURE%\freeglut-2.8.1\include" -DGLUT_glut_LIBRARY="%LIBPATH%\%ARCHITECTURE%\freeglut-2.8.1\lib\freeglut.lib" -DGLEW_INCLUDE_DIR="%LIBPATH%\%ARCHITECTURE%\glew-1.10.0\include" -DGLEW_LIBRARY="%LIBPATH%\%ARCHITECTURE%\glew-1.10.0\lib\glew32.lib" -DBOOST_ROOT="%LIBPATH%/%ARCHITECTURE%/boost_1_59_0" -DBOOST_LIBRARYDIR="%LIBPATH%/%ARCHITECTURE%/boost_1_59_0/lib64-msvc-12.0" -DCGAL_INCLUDE_DIR="%LIBPATH%/%ARCHITECTURE%/CGAL-4.7/include" -DCGAL_LIBRARY_DIR="%LIBPATH%/%ARCHITECTURE%/CGAL-4.7/lib" -DCGAL_BIN_DIR="%LIBPATH%/%ARCHITECTURE%/CGAL-4.7/bin" -DMUMPS_INCLUDE_DIR="%LIBPATH%/%ARCHITECTURE%/Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/include" -DMUMPS_LIBRARY="%LIBPATH%/%ARCHITECTURE%/Ipopt-3.11.9/Ipopt/MSVisualStudio/v8-ifort/installed/lib/CoinMumpsC.lib"
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
68
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"
    set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=C:\Qt\Qt%QT_REV%\%QT_REV%\msvc2017_64%QT_SUFFIX% 
69
70
    
    set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%LIBPATH%\%ARCHITECTURE%\freeglut-3.0.0\include" -DGLUT_glut_LIBRARY="%LIBPATH%\%ARCHITECTURE%\freeglut-3.0.0\lib\freeglut.lib" -DGLEW_INCLUDE_DIR="%LIBPATH%\%ARCHITECTURE%\glew-2.0.0\include" -DGLEW_LIBRARY="%LIBPATH%\%ARCHITECTURE%\glew-2.0.0\lib\glew32.lib" -DBOOST_ROOT="%LIBPATH%/%ARCHITECTURE%/boost_1_67_0" -DBOOST_LIBRARYDIR="%LIBPATH%/%ARCHITECTURE%/boost_1_67_0/lib64-msvc-14.1" -DCGAL_INCLUDE_DIR="%LIBPATH%/%ARCHITECTURE%/CGAL-4.12/include" -DCGAL_LIBRARY_DIR="%LIBPATH%/%ARCHITECTURE%/CGAL-4.12/lib" -DCGAL_BIN_DIR="%LIBPATH%/%ARCHITECTURE%/CGAL-4.12/bin" -DMUMPS_INCLUDE_DIR="%LIBPATH%/%ARCHITECTURE%/Ipopt-3.12.9/include" -DMUMPS_LIBRARY="%LIBPATH%/%ARCHITECTURE%/Ipopt-3.12.9/lib/CoinMumpsC.lib"
Martin Schultz's avatar
Martin Schultz committed
71
72
)

Max Lyon's avatar
Max Lyon committed
73
"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
74
75
76
77
78
79
80
81

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


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

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