setup_vars_macosx.sh.in 734 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
  3. [[ ! "${OPENCV_QUIET}" ]] && ( echo "Setting vars for OpenCV @OPENCV_VERSION@" )
  4. export DYLD_LIBRARY_PATH="$SCRIPT_DIR/@OPENCV_LIB_RUNTIME_DIR_RELATIVE_CMAKECONFIG@:$DYLD_LIBRARY_PATH"
  5. if [[ ! "$OPENCV_SKIP_PYTHON" ]]; then
  6. PYTHONPATH_OPENCV="$SCRIPT_DIR/@OPENCV_PYTHON_DIR_RELATIVE_CMAKECONFIG@"
  7. [[ ! "${OPENCV_QUIET}" ]] && ( echo "Append PYTHONPATH: ${PYTHONPATH_OPENCV}" )
  8. export PYTHONPATH="${PYTHONPATH_OPENCV}:$PYTHONPATH"
  9. fi
  10. # Don't exec in "sourced" mode
  11. if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
  12. if [[ $# -ne 0 ]]; then
  13. [[ ! "${OPENCV_QUIET}" && "${OPENCV_VERBOSE}" ]] && ( echo "Executing: $*" )
  14. exec "$@"
  15. fi
  16. fi