]> Creatis software - creaToolsTools.git/blob - Install_ThirdParty/scripts/install_thirdparty_libraries_cmake.bat
DFCH: Update creaThirdParty installers (Possible bug solved)
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_libraries_cmake.bat
1 @echo off
2 echo -----------------------------------
3 echo ------Asking Architecture----------
4 echo -----------------------------------
5 if %PROCESSOR_ARCHITECTURE%==x86 (
6   set ProgramFilesPath_x86=%ProgramFiles%
7   echo "Architecture found = x86"
8 ) else (
9   set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
10   echo "Architecture found = x64"
11 )
12
13 echo ----End Asking Architecture--------
14
15 set thirdpartyGeneration=%1
16
17 set thirdparty_cmake=%cd%\..\cmake
18
19 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
20
21 set thirdpartylibpath=%thirdpartyGeneration%\thirdparty_temp\creaThirdParty_libraries
22 set sourcepath=%thirdparty_cmake%\crea_ThirdParty_Libraries
23 set binpath=%thirdpartyGeneration%\thirdparty_bin\creaTPLBin
24 set installpath="ProgramFilesPath_x86\creatools\crea_ThirdParty_Libraries"
25
26 if not exist %vcvarsall% set zipPath="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
27 if not exist %vcvarsall% (
28   echo ERROR!!! Visual Studio has not been found in the system
29   exit
30 )
31
32 call %vcvarsall%
33
34 mkdir %binpath%
35 cd %binpath%
36
37 cmake -G"Visual Studio 10"  -H%sourcepath% -B%binpath%
38 cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath% CMakeCache.txt
39 cmake -D CREA_LIBRARY_SOURCE_PATH:PATH=%thirdpartylibpath% CMakeCache.txt
40 cmake CMakeCache.txt
41 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
42 msbuild /p:Configuration=release PACKAGE.vcxproj
43 @echo on