]> Creatis software - creaToolsTools.git/blob - Install_ThirdParty/scripts/install_thirdparty_dlls_cmake.bat
127d4430a207e0cd613a3ec8e95f9f1be934a1d6
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_dlls_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
16 set thirdpartydllspath=%1
17
18 set thirdparty_cmake=%cd%\..\cmake
19
20 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
21
22 set sourcepath=%thirdparty_cmake%\crea_ThirdParty_dlls
23 set binpath=%thirdparty_cmake%\crea_ThirdParty_dlls_Bin
24 set installpath="C:\Temp\creatools\crea_ThirdParty_dlls"
25 echo set installpath="ProgramFilesPath_x86\creatools\crea_ThirdParty_dlls"
26
27 if not exist %vcvarsall% set zipPath="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
28 if not exist %vcvarsall% (
29   echo ERROR!!! Visual Studio has not been found in the system
30   exit
31 )
32
33 call %vcvarsall%
34
35 mkdir %binpath%
36 cd %binpath%
37
38 cmake -G"Visual Studio 10"  -H%sourcepath% -B%binpath%
39 cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath% CMakeCache.txt
40 cmake -D CREA_LIBRARY_DLL_PATH:PATH=%thirdpartydllspath% CMakeCache.txt
41 cmake CMakeCache.txt
42 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
43 msbuild /p:Configuration=release INSTALL.vcxproj
44 @echo on