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