-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstallCeresVTk.sh
More file actions
101 lines (86 loc) · 3.68 KB
/
installCeresVTk.sh
File metadata and controls
101 lines (86 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
function MAJGitRepo
# $1=nom $2 $3=url
{
if [ ! -d "$myRepo/$1" ]; then
echo "clonning ${1}"
git clone $2
mkdir Build/$1
else
echo "update $1"
cd $1
git pull
cd ..
fi
}
#!/bin/bash
echo "Installation de ceres et vtk"
myRepo=$(pwd)
CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"
echo $CMAKE_CONFIG_GENERATOR
MAJGitRepo eigen https://github.com/RLovelett/eigen.git
RepoSource=gflags
MAJGitRepo $RepoSource https://github.com/gflags/gflags.git
cd Build/$RepoSource
optCMAKE='-DINTTYPES_FORMAT:STRING=C99 -DNAMESPACE:STRING=google -DCMAKE_INSTALL_PREFIX=../../Install/gflags'
echo $CMAKE_CONFIG_GENERATOR
echo $optCMAKE
cmake -G"$CMAKE_CONFIG_GENERATOR" "$optCMAKE" ../../"$RepoSource"
cd ..
echo "************************* $Source_DIR -->debug"
cmake --build $RepoSource --config debug
echo "************************* $Source_DIR -->release"
cmake --build $RepoSource --config release
cd ..
RepoSource=glog
MAJGitRepo $RepoSource https://github.com/google/glog.git
cd Build/$RepoSource
optCMAKE='-DCMAKE_INSTALL_PREFIX=../../Install/glog'
cmake -G"$CMAKE_CONFIG_GENERATOR" $optCMAKE ../../"$RepoSource"
cd ..
echo "************************* $Source_DIR -->debug"
cmake --build $RepoSource --config debug
echo "************************* $Source_DIR -->release"
cmake --build $RepoSource --config release
cmake --build $RepoSource --target install --config debug
rename $myRepo/Install/glog/lib/glog.lib $myRepo/Install/glog/lib/glogd.lib
cmake --build $RepoSource --target install --config release
cd ..
RepoSource=vtk
MAJGitRepo $RepoSource https://gitlab.kitware.com/vtk/vtk.git
cd Build/$RepoSource
optCMAKE='-DCMAKE_INSTALL_PREFIX=../../Install/vtk -DBUILD_TESTING:BOOL=OFF'
cmake -G"$CMAKE_CONFIG_GENERATOR" $optCMAKE ../../"$RepoSource"
cd ..
echo "************************* $Source_DIR -->debug"
cmake --build $RepoSource --config debug
echo "************************* $Source_DIR -->release"
cmake --build $RepoSource --config release
cmake --build $RepoSource --target install --config release
cmake --build $RepoSource --target install --config debug
cd ..
RepoSource=ceres-solver
MAJGitRepo $RepoSource https://github.com/ceres-solver/ceres-solver.git
cd Build/$RepoSource
optCMAKE='-DEIGEN_INCLUDE_DIR=../../eigen -DCMAKE_INSTALL_PREFIX=../../Install/ceres-solver'
cmake -G"$CMAKE_CONFIG_GENERATOR" $optCMAKE -Dglog_DIR:PATH="$myRepo"/Install/glog -Dgflags_DIR:PATH="$myRepo"/Build/gflags ../../"$RepoSource"
cd ..
echo "************************* $Source_DIR -->debug"
cmake --build $RepoSource --config debug
echo "************************* $Source_DIR -->release"
cmake --build $RepoSource --config release
cmake --build $RepoSource --target install --config release
cmake --build $RepoSource --target install --config debug
cd ..
RepoSource=opencv
cd Build/$RepoSource
optCMAKE=( )
echo $optCMAKE
cmake -G"$CMAKE_CONFIG_GENERATOR" -DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DWITH_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -DCMAKE_INSTALL_PREFIX=../../install/"$RepoSource" -DVTK_DIR="$myRepo"/install/vtk/lib/cmake/vtk-8.1 -Dglog_DIR:PATH="$myRepo"/install/glog/cmake -Dgflags_DIR:PATH="$myRepo"/build/gflags -DCeres_DIR:PATH="$myRepo"/install/ceres-solver/cmake -DEIGEN_DIR:PATH="$myRepo"/eigen -DEIGEN_INCLUDE_PATH=../../eigen ../../"$RepoSource"
cd ..
echo "************************* $Source_DIR -->devenv debug"
cmake --build $RepoSource --config debug
echo "************************* $Source_DIR -->devenv release"
cmake --build $RepoSource --config release
cmake --build $RepoSource --target install --config release
cmake --build $RepoSource --target install --config debug
cd ..