]> Creatis software - creaToolsTools.git/blobdiff - Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat
DFCH: ThirdParty Libraries installer generator working -- script tested and updated...
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_dlls_cmake.bat
index 2e791bfd03c414963e46751a714e309c4e9f7ec7..cb2116f1e74239b0c177cfaa1961a4882791f2c9 100644 (file)
@@ -18,6 +18,8 @@ echo ----End Asking Architecture--------
 
 set thirdpartyGeneration=%1
 set buildType=%2
+::The following line is to force x86 or x64 compilation
+set x86Comp=%3
 
 
 set version="3.0.1-win32"
@@ -37,19 +39,28 @@ if not exist %vcvarsall% (
   exit
 )
 
-if %PROCESSOR_ARCHITECTURE%==x86 (
+if %x86Comp%==ON (
        call %vcvarsall%
+       echo "Compilation forced x86"
 ) else (
-       call %vcvarsall% amd64
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               call %vcvarsall%
+       ) else (
+               call %vcvarsall% amd64
+       )
 )
 
 mkdir %binpath%
 cd %binpath%
 
-if %PROCESSOR_ARCHITECTURE%==x86 (
+if %x86Comp%==ON (
        cmake -G"Visual Studio 10"  -H%sourcepath% -B%binpath%
 ) else (
-       cmake -G"Visual Studio 10 Win64"  -H%sourcepath% -B%binpath%
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               cmake -G"Visual Studio 10"  -H%sourcepath% -B%binpath%
+       ) else (
+               cmake -G"Visual Studio 10 Win64"  -H%sourcepath% -B%binpath%
+       )
 )
 
 cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath% CMakeCache.txt