holdingarea/build.bat
branchbug235_bringup_0
changeset 37 1a4430846fcf
parent 34 dab1d38bc12e
equal deleted inserted replaced
36:563aa0c4cea3 37:1a4430846fcf
     6 set USE_MINI_EGL=OFF
     6 set USE_MINI_EGL=OFF
     7 set PLATSIM_EXTENSIONS=ON
     7 set PLATSIM_EXTENSIONS=ON
     8 set VISUAL_STUDIO_VERSION=2005
     8 set VISUAL_STUDIO_VERSION=2005
     9 set CMAKE_BUILD_TARGET=Release
     9 set CMAKE_BUILD_TARGET=Release
    10 set VISUAL_STUDIO_SOLUTION=OFF
    10 set VISUAL_STUDIO_SOLUTION=OFF
       
    11 set BUILD=ON
    11 
    12 
    12 :PARSECOMMANDLINE
    13 :PARSECOMMANDLINE
    13 IF '%1'=='/h' goto PRINTUSAGE
    14 IF '%1'=='/h' goto PRINTUSAGE
    14 IF '%1'=='/H' goto PRINTUSAGE
    15 IF '%1'=='/H' goto PRINTUSAGE
    15 IF '%1'=='/?' goto PRINTUSAGE
    16 IF '%1'=='/?' goto PRINTUSAGE
    21 IF '%1'=='/VS' goto SETVISUALSTUDIOVERSION
    22 IF '%1'=='/VS' goto SETVISUALSTUDIOVERSION
    22 IF '%1'=='/solution' goto ENABLESOLUTION
    23 IF '%1'=='/solution' goto ENABLESOLUTION
    23 IF '%1'=='/SOLUTION' goto ENABLESOLUTION
    24 IF '%1'=='/SOLUTION' goto ENABLESOLUTION
    24 IF '%1'=='/debug' goto ENABLEDEBUG
    25 IF '%1'=='/debug' goto ENABLEDEBUG
    25 IF '%1'=='/DEBUG' goto ENABLEDEBUG
    26 IF '%1'=='/DEBUG' goto ENABLEDEBUG
       
    27 IF '%1'=='/nobuild' goto DISABLEBUILD
       
    28 IF '%1'=='/NOBUILD' goto DISABLEBUILD
    26 
    29 
    27 if "%VISUAL_STUDIO_SOLUTION%"=="ON" (
    30 if "%VISUAL_STUDIO_SOLUTION%"=="ON" (
    28 	set GENERATOR=Visual Studio 8 2005
    31 	set GENERATOR=Visual Studio 8 2005
    29 	if '%VISUAL_STUDIO_VERSION%'=='2008' set GENERATOR=Visual Studio 9 2008
    32 	if '%VISUAL_STUDIO_VERSION%'=='2008' set GENERATOR=Visual Studio 9 2008
    30 ) else (
    33 ) else (
    36 echo USE_MINI_EGL          = %USE_MINI_EGL%
    39 echo USE_MINI_EGL          = %USE_MINI_EGL%
    37 echo PLATSIM_EXTENSIONS    = %PLATSIM_EXTENSIONS%
    40 echo PLATSIM_EXTENSIONS    = %PLATSIM_EXTENSIONS%
    38 echo VISUAL_STUDIO_VERSION = %VISUAL_STUDIO_VERSION%
    41 echo VISUAL_STUDIO_VERSION = %VISUAL_STUDIO_VERSION%
    39 echo GENERATOR             = %GENERATOR%
    42 echo GENERATOR             = %GENERATOR%
    40 echo CMAKE_BUILD_TARGET    = %CMAKE_BUILD_TARGET%
    43 echo CMAKE_BUILD_TARGET    = %CMAKE_BUILD_TARGET%
       
    44 echo BUILD                 = %BUILD%
    41 echo.
    45 echo.
    42 
    46 
    43 rem Execute
    47 rem Execute
    44 echo on
    48 echo on
    45 rmdir /s /q build
    49 rmdir /s /q build
    46 mkdir build
    50 mkdir build
    47 cd build
    51 cd build
    48 cmake -DUSE_MINI_EGL:Bool=%USE_MINI_EGL% -DPLATSIM_EXTENSIONS:Bool=%PLATSIM_EXTENSIONS% -DVISUAL_STUDIO_VERSION:String=%VISUAL_STUDIO_VERSION% -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TARGET% -G "%GENERATOR%" ../..
    52 cmake -DUSE_MINI_EGL:Bool=%USE_MINI_EGL% -DPLATSIM_EXTENSIONS:Bool=%PLATSIM_EXTENSIONS% -DVISUAL_STUDIO_VERSION:String=%VISUAL_STUDIO_VERSION% -DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TARGET% -G "%GENERATOR%" ../..
    49 @echo off
    53 @echo off
       
    54 if "%BUILD%"=="ON" (
    50 if "%GENERATOR%"=="NMake Makefiles" (
    55 if "%GENERATOR%"=="NMake Makefiles" (
    51 	echo on
    56 	echo on
    52 	nmake
    57 	nmake
    53 	@echo off
    58 	@echo off
       
    59 )
    54 )
    60 )
    55 @echo off
    61 @echo off
    56 cd ..
    62 cd ..
    57 
    63 
    58 goto END
    64 goto END
    65 echo     [/VS VERSION]       set Visual Studio version
    71 echo     [/VS VERSION]       set Visual Studio version
    66 echo                         supported versions = 2005, 2008 (default: 2005)
    72 echo                         supported versions = 2005, 2008 (default: 2005)
    67 echo     [/SOLUTION]         just generate VIsual Studio solution files
    73 echo     [/SOLUTION]         just generate VIsual Studio solution files
    68 echo                             (default: generate NMake makefiles and build)
    74 echo                             (default: generate NMake makefiles and build)
    69 echo     [/DEBUG]            configure for debug build (default: release)
    75 echo     [/DEBUG]            configure for debug build (default: release)
       
    76 echo     [/NOBUILD]          call cmake but do not call nmake
       
    77 echo                             note: has no effect if /SOLUTION is specified
    70 goto END
    78 goto END
    71 
    79 
    72 :ENABLEMINIEGL
    80 :ENABLEMINIEGL
    73 set USE_MINI_EGL=ON
    81 set USE_MINI_EGL=ON
    74 shift
    82 shift
    93 :ENABLEDEBUG
   101 :ENABLEDEBUG
    94 set CMAKE_BUILD_TARGET=Debug
   102 set CMAKE_BUILD_TARGET=Debug
    95 shift
   103 shift
    96 goto PARSECOMMANDLINE
   104 goto PARSECOMMANDLINE
    97 
   105 
       
   106 :DISABLEBUILD
       
   107 set BUILD=OFF
       
   108 shift
       
   109 goto PARSECOMMANDLINE
       
   110 
    98 :END
   111 :END
    99 
   112 
   100 
   113