mirror of
https://github.com/opencv/opencv.git
synced 2026-09-13 13:55:39 -05:00
Documented how to change the version of Maven to match OpenCV core and modified bash scripts accordingly. Extracted integration test module and placed into own profile. Configured CMake Maven plugin to use native CMake by default. Updated documentation.
22 lines
805 B
Bash
Executable File
22 lines
805 B
Bash
Executable File
#!/bin/bash
|
|
###############################################################
|
|
#
|
|
# Defines some common functions.
|
|
#
|
|
# Kerry Billingham <contact [At] AvionicEngineers.{com]>
|
|
#
|
|
##############################################################
|
|
majorHashDefine="#define CV_VERSION_MAJOR"
|
|
minorHashDefine="#define CV_VERSION_MINOR"
|
|
revisionHashDefine="#define CV_VERSION_REVISION"
|
|
statusHashDefine="#define CV_VERSION_STATUS"
|
|
versionHeader="../../../../modules/core/include/opencv2/core/version.hpp"
|
|
|
|
function extract_version() {
|
|
minorVersion=$(grep "${minorHashDefine}" $versionHeader | grep -o ".$")
|
|
majorVersion=$(grep "${majorHashDefine}" $versionHeader | grep -o ".$")
|
|
revision=$(grep "${revisionHashDefine}" $versionHeader | grep -o ".$")
|
|
|
|
REPLY="${majorVersion}.${minorVersion}.${revision}"
|
|
}
|