--- /dev/null
+REM ---------------------------------------------------------------------
+REM
+REM Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+REM pour la Santé)
+REM Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+REM
+REM This software is governed by the CeCILL-B license under French law and
+REM abiding by the rules of distribution of free software. You can use,
+REM modify and/ or redistribute the software under the terms of the CeCILL-B
+REM license as circulated by CEA, CNRS and INRIA at the following URL
+REM http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+REM or in the file LICENSE.txt.
+REM
+REM As a counterpart to the access to the source code and rights to copy,
+REM modify and redistribute granted by the license, users are provided only
+REM with a limited warranty and the software's author, the holder of the
+REM economic rights, and the successive licensors have only limited
+REM liability.
+REM
+REM The fact that you are presently reading this means that you have had
+REM knowledge of the CeCILL-B license and that you accept its terms.
+REM ------------------------------------------------------------------------
+
+@echo off
+echo ----------------------------
+echo -------cmakemod.bat---------
+echo ----------------------------
+
+echo creasource = %1
+echo installPrefix = %2
+echo creatoolsGeneration = %3
+
+echo Architecture found = %PROCESSOR_ARCHITECTURE%
+
+::if %PROCESSOR_ARCHITECTURE%==x86 (
+:: set ProgramFilesPath_x86=%ProgramFiles%
+:: set "compilerVersion=Visual Studio 10"
+::) else (
+:: set "ProgramFilesPath_x64=%ProgramFiles%"
+:: set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
+:: set "compilerVersion=Visual Studio 10 Win64"
+::)
+::set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
+::if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
+::if not exist %vcvarsall% (
+:: echo ERROR!!! Visual Studio has not been found in the system
+:: exit
+::)
+
+::if %platforme%==Win32 (
+:: call %vcvarsall%
+:: set "compilerVersion=Visual Studio 10"
+:: echo "Compilation forced x86"
+::) else (
+:: if %PROCESSOR_ARCHITECTURE%==x86 (
+:: call %vcvarsall%
+:: ) else (
+:: call %vcvarsall% amd64
+:: )
+::)
+
+set binfolder=%3\creatools_%buildtype%%platforme%\cb\%1Bin
+cd %binfolder%
+
+echo cmake -G"%compilerVersion%" -H%3\creatools_sources\%1 -B%3\c_%buildtype%%platforme%\cb\%1Bin
+echo cmake -D INCLUDE_CTEST:BOOL=ON -D CMAKE_INSTALL_PREFIX:PATH=%2\%1 CMakeCache.txt
+
+%cmakeBin% -G"MinGW Makefiles" -H%3\cs\%1 -B%3\c_%buildtype%%platforme%\cb\%1Bin
+%cmakeBin% -D CMAKE_BUILD_TYPE:STRING=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%2\%1 CMakeCache.txt
+
+exit /B
\ No newline at end of file