]> Creatis software - creaToolsTools.git/blob - Linux/scripts/cmakemod.sh
#2493 creaToolsTools Feature New Normal - Prepare and Install binary CreaTools...
[creaToolsTools.git] / Linux / scripts / cmakemod.sh
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Santé)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 #
7 #  This software is governed by the CeCILL-B license under French law and 
8 #  abiding by the rules of distribution of free software. You can  use, 
9 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
10 #  license as circulated by CEA, CNRS and INRIA at the following URL 
11 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
12 #  or in the file LICENSE.txt.
13 #
14 #  As a counterpart to the access to the source code and  rights to copy,
15 #  modify and redistribute granted by the license, users are provided only
16 #  with a limited warranty  and the software's author,  the holder of the
17 #  economic rights,  and the successive licensors  have only  limited
18 #  liability. 
19 #
20 #  The fact that you are presently reading this means that you have had
21 #  knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------  
23
24
25 #!/bin/bash
26
27 currentdir=$2
28 installPrefix=$3
29 dirInstall=$currentdir/creatools_bin/$1Bin
30 buildType=$4
31
32 echo " "
33 echo " "
34 echo " "
35 echo " "
36 echo " ========================================================================== $1 ======================================================== "
37 echo " "
38 echo " "
39 echo " "
40 echo " "
41 echo " ======="
42 echo $1
43 echo $2
44 echo $3
45 echo $4
46 echo " ======="
47 if [ $buildType = "Debug" ]
48 then
49 debug="ON"
50 else
51 debug="OFF"
52 fi
53
54 echo dirInstall
55 echo $dirInstall
56
57 mkdir -p $dirInstall
58 cd $dirInstall
59 echo -H$currentdir/creatools_source/$1
60 echo -B$dirInstall/
61
62
63 echo cmake -G"CodeBlocks - Unix Makefiles" -H$currentdir/creatools_source/$1 -B$dirInstall/
64 ## cmake -G"Unix Makefiles" -H$currentdir/creatools_source/$1 -B$dirInstall/
65 cmake -G"CodeBlocks - Unix Makefiles" -H$currentdir/creatools_source/$1 -B$dirInstall/
66
67 pwd
68 echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
69 echo cmake -D BUILD_ALL:BOOL=ON -D INCLUDE_CTEST:BOOL=ON -D USE_DEBUG_LIB:BOOL=$debug -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
70 echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
71 cmake -D BUILD_ALL:BOOL=ON -D INCLUDE_CTEST:BOOL=ON -D USE_DEBUG_LIB:BOOL=$debug -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
72
73 # the following line is the right one!
74 #cmake -D INCLUDE_CTEST:BOOL=ON CMakeCache.txt
75
76 # This one : only for misinstalled vtk:
77 # modify VTK_DIR:PATH=, acording to your own computer
78
79 ##cmake -D INCLUDE_CTEST:BOOL=ON -D BBTK_USE_WXWIDGETS:BOOL=ON -D VTK_DIR:PATH=$VTKdir -D crea_DIR:PATH=$currentdir/creatools_bin/creaBin -D BBTK_DIR:PATH=$currentdir/creatools_bin/bbtkBin -D CMAKE_INSTALL_PREFIX:PATH=$installPrefix CMakeCache.txt
80 cd ..
81
82