Author: tkreuzer Date: Sun Jul 22 14:21:43 2012 New Revision: 56935
URL: http://svn.reactos.org/svn/reactos?rev=56935&view=rev Log: [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.
Modified: trunk/reactos/configure.cmd
Modified: trunk/reactos/configure.cmd URL: http://svn.reactos.org/svn/reactos/trunk/reactos/configure.cmd?rev=56935&... ============================================================================== --- trunk/reactos/configure.cmd [iso-8859-1] (original) +++ trunk/reactos/configure.cmd [iso-8859-1] Sun Jul 22 14:21:43 2012 @@ -1,4 +1,16 @@ @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 @@ -37,6 +49,7 @@ :: 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 @@ ) 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 @@ ) 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...