]> Creatis software - creaToolsTools.git/blobdiff - Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat
DFCH: ThirdParty Libraries installer generator working -- script tested and updated...
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_libraries_cmake.bat
index cd24ef5c8bec4b4b4529ded35695d92ea98f989e..48da8b58bd616fe1c51f6ebe615dea54eeb75529 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"
 
@@ -36,19 +38,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