mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 05:28:14 +00:00
[CMAKE]
Add support for MSVC ARM Configuration script works as usual from VS 11 ARM command prompt, host tools is configured for x86 and must be compiled from a VS x86 command prompt. svn path=/trunk/; revision=56935
This commit is contained in:
parent
7024c1ba5c
commit
d62e513aad
1 changed files with 23 additions and 1 deletions
|
@ -1,5 +1,17 @@
|
|||
@echo off
|
||||
|
||||
:: Special case %1 = arm_hosttools %2 = vcvarsall.bat %3 = %CMAKE_GENERATOR%
|
||||
if /I "%1" == "arm_hosttools" (
|
||||
echo Configuring x86 host tools for ARM cross build
|
||||
|
||||
:: This launches %VSINSTALLDIR%VS\vcvarsall.bat
|
||||
call %2 x86
|
||||
|
||||
:: Configure host tools for x86
|
||||
cmake -G %3 -DARCH=i386 %~dp0
|
||||
exit /b
|
||||
)
|
||||
|
||||
:: Get the source root directory
|
||||
set REACTOS_SOURCE_DIR=%~dp0
|
||||
set USE_NMAKE=0
|
||||
|
@ -37,6 +49,7 @@ if defined ROS_ARCH (
|
|||
:: VS command prompt does not put this in enviroment vars
|
||||
cl 2>&1 | find "x86" > NUL && set ARCH=i386
|
||||
cl 2>&1 | find "x64" > NUL && set ARCH=amd64
|
||||
cl 2>&1 | find "ARM" > NUL && set ARCH=arm
|
||||
cl 2>&1 | find "14." > NUL && set BUILD_ENVIRONMENT=VS8
|
||||
cl 2>&1 | find "15." > NUL && set BUILD_ENVIRONMENT=VS9
|
||||
cl 2>&1 | find "16." > NUL && set BUILD_ENVIRONMENT=VS10
|
||||
|
@ -69,6 +82,8 @@ if defined ROS_ARCH (
|
|||
) else if "%BUILD_ENVIRONMENT%" == "VS11" (
|
||||
if "%ARCH%" == "amd64" (
|
||||
set CMAKE_GENERATOR="Visual Studio 11 Win64"
|
||||
) else if "%ARCH%" == "arm" (
|
||||
set CMAKE_GENERATOR="Visual Studio 11 ARM"
|
||||
) else (
|
||||
set CMAKE_GENERATOR="Visual Studio 11"
|
||||
)
|
||||
|
@ -140,7 +155,14 @@ if EXIST CMakeCache.txt (
|
|||
)
|
||||
set REACTOS_BUILD_TOOLS_DIR=%CD%
|
||||
|
||||
cmake -G %CMAKE_GENERATOR% -DARCH=%ARCH% %REACTOS_SOURCE_DIR%
|
||||
:: Use x86 for ARM host tools
|
||||
if "%ARCH%" == "arm" (
|
||||
:: Launch new script instance for x86 host tools configuration
|
||||
start "Preparing host tools for ARM cross build..." /WAIT /I /B %~dp0configure.cmd arm_hosttools "%VSINSTALLDIR%VC\vcvarsall.bat" %CMAKE_GENERATOR%
|
||||
) else (
|
||||
cmake -G %CMAKE_GENERATOR% -DARCH=%ARCH% %REACTOS_SOURCE_DIR%
|
||||
)
|
||||
|
||||
cd..
|
||||
|
||||
echo Preparing reactos...
|
||||
|
|
Loading…
Reference in a new issue