Ignore:
Timestamp:
2014-07-09T10:46:30+12:00 (10 years ago)
Author:
jmt12
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/openCV/trunk/src/packages/CASCADE-MAKE/OPENCV.sh

    r26881 r29124  
    22
    33package=OpenCV
    4 version=-2.4.3
     4version=-2.4.9
    55
    66progname=$0
     
    1717#echo GSDLOS = $GSDLOS
    1818
     19opt_run_untar $force_untar $auto_untar $package $version
     20
    1921# Whether force_config is set for this package depends on CMake test
    2022# to see if 'release' directory has been created or no
    2123if [ $auto_config = "1" ] ; then
    22   if [ ! -d $package$version/release ; then
     24  if [ ! -d $package$version/release ] ; then
    2325    force_config=1
    2426  fi
    2527fi
    2628
    27 opt_run_untar $force_untar $auto_untar $package $version .tar.bz2
     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
    2836
    2937if [ $force_config = "1" ] ; then
     
    3543    fi ; \
    3644    cd release ; \
    37     cmake -D CMAKE_BUILD_TYPE=RELEASE \
    38           -D CMAKE_INSTALL_PREFIX=$prefix \
    39           -D BUILD_PYTHON_SUPPORT=OFF ..;
    40     PKG_CONFIG_PATH=$prefix/lib/pkgconfig:${PKG_CONFIG_PATH};
    41     export PKG_CONFIG_PATH;
     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; \
    4252   )
    4353  if [ $? != 0 ] ; then
     
    4656  fi
    4757  echo "[popd]"
     58  opt_run_cmake $compile $package $version "release"
     59  opt_run_cmake $install $package $version "release" "install"
    4860else
    4961  if [ $auto_config = "1" ] ; then
     
    5264fi
    5365
    54 opt_run_cmake $compile $package $version "release"
    55 opt_run_cmake $install $package $version "release" "install"
    5666opt_run_cmake $clean $package $version "release" "clean"
    5767opt_run_cmake $distclean $package $version "release" "distclean"
Note: See TracChangeset for help on using the changeset viewer.