-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_eigen.bat
68 lines (54 loc) · 3.24 KB
/
make_eigen.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@echo off
rem ---------------------------------------------------------------------------------------------- #
rem This file is part of CosmoScout VR #
rem and may be used under the terms of the MIT license. See the LICENSE file for details. #
rem Copyright: (c) 2019 German Aerospace Center (DLR) #
rem ---------------------------------------------------------------------------------------------- #
rem ---------------------------------------------------------------------------------------------- #
rem Make sure to run "git submodule update --init" before executing this script! #
rem Default build mode is release, if "set COSMOSCOUT_DEBUG_BUILD=true" is executed before, all #
rem dependecies will be built in debug mode. #
rem Usage: #
rem make_externals.bat [additional CMake flags, defaults to -G "Visual Studio 15 Win64"] #
rem Examples: #
rem make_externals.bat #
rem make_externals.bat -G "Visual Studio 15 Win64" #
rem make_externals.bat -G "Visual Studio 16 2019" -A x64 #
rem ---------------------------------------------------------------------------------------------- #
rem The CMake generator and other flags can be passed as parameters.
set CMAKE_FLAGS=-G "Visual Studio 15 Win64"
IF NOT "%~1"=="" (
SET CMAKE_FLAGS=%*
)
rem Check if ComoScout VR debug build is enabled with "set COSMOSCOUT_DEBUG_BUILD=true".
IF "%COSMOSCOUT_DEBUG_BUILD%"=="true" (
echo CosmoScout VR debug build is enabled!
set BUILD_TYPE=debug
) else (
set BUILD_TYPE=release
)
rem Create some required variables. ----------------------------------------------------------------
rem This directory should contain all submodules - they are assumed to reside in the subdirectory
rem "externals" next to this script.
set EXTERNALS_DIR=%~dp0\externals
rem Get the current directory - this is the default location for the build and install directory.
set CURRENT_DIR=%cd%
rem The build directory.
set BUILD_DIR=%CURRENT_DIR%\build\windows-externals-%BUILD_TYPE%
rem The install directory.
set INSTALL_DIR=%CURRENT_DIR%\install\windows-externals-%BUILD_TYPE%
rem Create some default installation directories.
cmake -E make_directory "%INSTALL_DIR%/lib"
cmake -E make_directory "%INSTALL_DIR%/share"
cmake -E make_directory "%INSTALL_DIR%/bin"
cmake -E make_directory "%INSTALL_DIR%/include"
rem # EIGEN -----------------------------------------------------------------------------------------
cmake -E make_directory "%BUILD_DIR%/eigen" && cd "%BUILD_DIR%/eigen"
cmake %CMAKE_FLAGS% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR%^
-DQt5_DIR=C:/Qt/Qt5.14.2/5.14.2/msvc2017_64/lib/cmake/Qt5^
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% "%EXTERNALS_DIR%/eigen"
cmake --build . --config %BUILD_TYPE% --target install --parallel 12
pause
cd "%CURRENT_DIR%"
echo Finished successfully.
@echo on