0031999: Tests - request Core Profile on macOS for Ray-Tracing tests
[occt.git] / genproj.bat
index f931114..1198bd5 100644 (file)
@@ -2,6 +2,9 @@
 
 rem Helper script to run generation of VS projects on Windows.
 rem Running it requires that Tcl should be in the PATH
+rem Optional arguments: Format OS
+rem Format can be vc10, vc11, vc12, vc14, vc141, cbp, or xcd
+rem OS can be wnt, uwp, mac, or lin
 
 SET "OLD_PATH=%PATH%"
 
@@ -17,7 +20,7 @@ if not exist "%~dp0custom.bat" (
 )
 
 if exist "%~dp0env.bat" (
-  call "%~dp0env.bat"
+  call "%~dp0env.bat" %1
 )
 
 rem  find Tcl
@@ -38,6 +41,18 @@ if not defined TCL_FOUND (
   goto :eof
 ) 
 
+set aPlatform=%2
+if "%aPlatform%" == "" (
+  set aPlatform=wnt
+  if "%VCPROP%" == "Universal" (
+    set aPlatform=uwp
+  )
+)
+
+set aPrjFmt=%PRJFMT%
+if "%aPrjFmt%" == "" ( set "aPrjFmt=vcxproj" )
+if "%aPrjFmt%" == "vcxproj" ( set "aPrjFmt=%VCFMT%" )
+
 cd %~dp0
-%TCL_EXEC% %~dp0adm/start.tcl genproj -path=. -target=%VCVER%
+%TCL_EXEC% %~dp0adm/start.tcl genproj %aPrjFmt% %aPlatform% -solution "OCCT" %3 %4 %5
 SET "PATH=%OLD_PATH%"