source: gs3-extensions/openCV/trunk/src/packages/CASCADE-MAKE/CMAKE.sh@ 29121

Last change on this file since 29121 was 29121, checked in by jmt12, 10 years ago

Cascade-Make files for cmake (used in building OpenCV) and openSIFT

  • Property svn:executable set to *
  • Property svn:mime-type set to application/x-shellscript
File size: 1.1 KB
Line 
1#!/bin/bash
2
3package=cmake
4version=-3.0.0
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXTOPENCV ../.. $*
9
10prefix=$GEXTOPENCV_INSTALLED
11
12opt_run_untar $force_untar $auto_untar $package $version
13opt_run_configure $force_config $auto_config $package $version $prefix
14
15# Only compile if necessary - we don't edit these source files.
16if type -p cmake; then
17 echo "found cmake in PATH"
18 _CMAKE=cmake
19elif [[ -x "$GEXTOPENCV_INSTALLED/linux/bin/cmake" ]]; then
20 echo "found cmake in openCV/linux/bin"
21 _CMAKE="$GEXTOPENCV_INSTALLED/linux/bin/cmake"
22fi
23
24if [[ "$_CMAKE" ]]; then
25 _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q')
26 echo "cmake version $_VERSION"
27fi
28
29if [[ ! "$_CMAKE" ]]; then
30 opt_run_make $compile $package $version
31 opt_run_make $install $package $version "install"
32else
33 echo "$package$version already available => no need to recompile"
34fi
35
36opt_run_make $clean $package $version "clean"
37opt_run_make $distclean $package $version "distclean"
38
39opt_run_tarclean $tarclean $package $version
40
41
42
43
44
Note: See TracBrowser for help on using the repository browser.