root/gs3-extensions/openCV/trunk/src/packages/CASCADE-MAKE/OPENCV.sh @ 29124

Revision 29124, 2.0 KB (checked in by jmt12, 5 years ago)

Added code to try and prevent OpenCV recompiling if it is already compiled... but it doesn't seem to work. At least it avoids running cmake each time

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3package=OpenCV
4version=-2.4.9
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXT_OPENCV ../.. $*
9
10prefix=$GEXTOPENCV_INSTALLED
11
12#export CFLAGS="$CFLAGS -I$GEXTAUDIODB_INSTALLED/include"
13#export CPPFLAGS="$CPPFLAGS -I$GEXTAUDIODB_INSTALLED/include"
14#export CXXFLAGS="$CXXFLAGS -I$GEXTAUDIODB_INSTALLED/include"
15#export LDFLAGS="$LDFLAGS -L$GEXTAUDIODB_INSTALLED/lib"
16
17#echo GSDLOS = $GSDLOS
18
19opt_run_untar $force_untar $auto_untar $package $version
20
21# Whether force_config is set for this package depends on CMake test
22# to see if 'release' directory has been created or no
23if [ $auto_config = "1" ] ; then
24  if [ ! -d $package$version/release ] ; then
25    force_config=1
26  fi
27fi
28
29if type -p opencv_createsamples; then
30  echo "found opencv in PATH"
31  _OPENCV=opencv_createsamples
32elif [[ -x "$GEXTOPENCV_INSTALLED/linux/bin/opencv_createsamples" ]]; then
33  echo "found opencv in openCV/linux/bin"
34  _OPENCV="$GEXTOPENCV_INSTALLED/linux/bin/opencv_createsamples"
35fi
36
37if [ $force_config = "1" ] ; then
38  echo "[pushd $package$version]"
39  ( cd $package$version ; \
40    if [ ! -d release ] ; then \
41      echo "Creating 'release' directory" ; \
42      mkdir release ; \
43    fi ; \
44    cd release ; \
45
46    if [ ! -f Makefile ] ; then \
47      cmake -D CMAKE_BUILD_TYPE=RELEASE \
48            -D CMAKE_INSTALL_PREFIX=$prefix ..;
49    fi ; \
50    PKG_CONFIG_PATH=$prefix/lib/pkgconfig:${PKG_CONFIG_PATH}; \
51    export PKG_CONFIG_PATH; \
52   )
53  if [ $? != 0 ] ; then
54      echo "      Error encountered running *configure* stage of $progname"
55      exit 1
56  fi
57  echo "[popd]"
58  opt_run_cmake $compile $package $version "release"
59  opt_run_cmake $install $package $version "release" "install"
60else
61  if [ $auto_config = "1" ] ; then
62    echo "Found top-level for ${progname%.*} => no need to run configure/initialize CMake"
63  fi
64fi
65
66opt_run_cmake $clean $package $version "release" "clean"
67opt_run_cmake $distclean $package $version "release" "distclean"
68
69opt_run_tarclean $tarclean $package $version
70
Note: See TracBrowser for help on using the browser.