4 if [ ! -d "$myRepo/$1" ]; then
15 echo "Installing leptonica and tesseract"
17 CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"
19 MAJGitRepo leptonica https://github.com/DanBloomberg/leptonica.git
21 pushd Build/$RepoSource
22 cmake -G"$CMAKE_CONFIG_GENERATOR" -DCMAKE_INSTALL_PREFIX="$myRepo"/Install/leptonica "$myRepo/$RepoSource"
23 echo "************************* $Source_DIR -->debug"
24 cmake --build . --config release
25 cmake --build $RepoSource --target install --config release
29 MAJGitRepo $RepoSource https://github.com/tesseract-ocr/tesseract.git
30 pushd Build/$RepoSource
31 cmake -G"$CMAKE_CONFIG_GENERATOR" -DBUILD_TRAINING_TOOLS:BOOL=OFF -DCMAKE_INSTALL_PREFIX="$myRepo"/Install/tesseract -DLeptonica_DIR:PATH="$myRepo"/Install/leptonica/cmake -DPKG_CONFIG_EXECUTABLE:BOOL=OFF "$myRepo"/"$RepoSource"
32 echo "************************* $Source_DIR -->release"
33 cmake --build . --config release
34 cmake --build . --target install --config release
38 pushd Build/$RepoSource
39 CMAKE_OPTIONS='-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF'
40 cmake -G"$CMAKE_CONFIG_GENERATOR" \
41 -DTesseract_INCLUDE_DIR:PATH="${myRepo}"/Install/tesseract/include -DTesseract_LIBRARY="${myRepo}"/Install/tesseract/lib/tesseract400.lib -DLept_LIBRARY="${myRepo}"/Install/leptonica/lib/leptonica-1.74.4.lib \
42 $CMAKE_OPTIONS -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
43 -DINSTALL_CREATE_DISTRIB=ON -DCMAKE_INSTALL_PREFIX="$myRepo"/install/"$RepoSource" "$myRepo/$RepoSource"
44 echo "************************* $Source_DIR -->devenv debug"
45 cmake --build . --config debug
46 echo "************************* $Source_DIR -->devenv release"
47 cmake --build . --config release
48 cmake --build . --target install --config release
49 cmake --build . --target install --config debug
In this script I suppose you use VS 2015 in 64 bits