next: update versions handling

This commit is contained in:
Alexander Alekhin 2020-10-09 16:55:00 +00:00
parent 53e6a25b6f
commit 9794ff1398
17 changed files with 29 additions and 27 deletions

View File

@ -45,7 +45,7 @@ if(NOT DEFINED CMAKE_HELPER_SCRIPT)
if(INSTALL_TO_MANGLED_PATHS) if(INSTALL_TO_MANGLED_PATHS)
ocv_update(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc") ocv_update(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
else() else()
ocv_update(OPENCV_PC_FILE_NAME opencv4.pc) ocv_update(OPENCV_PC_FILE_NAME opencv5.pc)
endif() endif()
# build the list of opencv libs and dependencies for all modules # build the list of opencv libs and dependencies for all modules

View File

@ -15,7 +15,7 @@ endif()
if(INSTALL_TO_MANGLED_PATHS) if(INSTALL_TO_MANGLED_PATHS)
ocv_update(OPENCV_SETUPVARS_FILENAME "setup_vars_opencv-${OPENCV_VERSION}${OPENCV_SCRIPT_EXTENSION}") ocv_update(OPENCV_SETUPVARS_FILENAME "setup_vars_opencv-${OPENCV_VERSION}${OPENCV_SCRIPT_EXTENSION}")
else() else()
ocv_update(OPENCV_SETUPVARS_FILENAME setup_vars_opencv4${OPENCV_SCRIPT_EXTENSION}) ocv_update(OPENCV_SETUPVARS_FILENAME setup_vars_opencv5${OPENCV_SCRIPT_EXTENSION})
endif() endif()
##### build directory ##### build directory

View File

@ -64,15 +64,15 @@ else() # UNIX
ocv_update(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OPENCV_BIN_INSTALL_PATH}") ocv_update(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OPENCV_BIN_INSTALL_PATH}")
ocv_update(OPENCV_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}") ocv_update(OPENCV_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}")
ocv_update(OPENCV_LIB_ARCHIVE_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}") ocv_update(OPENCV_LIB_ARCHIVE_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}")
ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/opencv4/3rdparty") ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/opencv5/3rdparty")
ocv_update(OPENCV_CONFIG_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/cmake/opencv4") ocv_update(OPENCV_CONFIG_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/cmake/opencv5")
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/opencv4") ocv_update(OPENCV_INCLUDE_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/opencv5")
ocv_update(OPENCV_OTHER_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4") ocv_update(OPENCV_OTHER_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv5")
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/samples") ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/samples")
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv4") ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv5")
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/testdata") ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/testdata")
ocv_update(OPENCV_DOC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/doc/opencv4") ocv_update(OPENCV_DOC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/doc/opencv5")
ocv_update(OPENCV_JAR_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/java/opencv4") ocv_update(OPENCV_JAR_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/java/opencv5")
ocv_update(OPENCV_JNI_INSTALL_PATH "${OPENCV_JAR_INSTALL_PATH}") ocv_update(OPENCV_JNI_INSTALL_PATH "${OPENCV_JAR_INSTALL_PATH}")
ocv_update(OPENCV_JNI_BIN_INSTALL_PATH "${OPENCV_JNI_INSTALL_PATH}") ocv_update(OPENCV_JNI_BIN_INSTALL_PATH "${OPENCV_JNI_INSTALL_PATH}")

View File

@ -144,9 +144,9 @@ set(CPACK_COMPONENT_PYTHON_CONFLICTS python-opencv)
set(CPACK_COMPONENT_PYTHON_PROVIDES python-opencv) set(CPACK_COMPONENT_PYTHON_PROVIDES python-opencv)
set(CPACK_COMPONENT_PYTHON_REPLACES python-opencv) set(CPACK_COMPONENT_PYTHON_REPLACES python-opencv)
set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv4.0-java, libopencv4.0-jni") set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv5.0-java, libopencv5.0-jni")
set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv4.0-java, libopencv4.0-jni") set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv5.0-java, libopencv5.0-jni")
set(CPACK_COMPONENT_JAVA_REPLACES "libopencv4.0-java, libopencv4.0-jni") set(CPACK_COMPONENT_JAVA_REPLACES "libopencv5.0-java, libopencv5.0-jni")
set(CPACK_COMPONENT_DOCS_CONFLICTS opencv-doc) set(CPACK_COMPONENT_DOCS_CONFLICTS opencv-doc)
set(CPACK_COMPONENT_SAMPLES_CONFLICTS opencv-doc) set(CPACK_COMPONENT_SAMPLES_CONFLICTS opencv-doc)

View File

@ -15,7 +15,7 @@ Tutorial was written for the following versions of corresponding software:
- Download and install Android Studio from https://developer.android.com/studio. - Download and install Android Studio from https://developer.android.com/studio.
- Get the latest pre-built OpenCV for Android release from https://github.com/opencv/opencv/releases and unpack it (for example, `opencv-4.X.Y-android-sdk.zip`). - Get the latest pre-built OpenCV for Android release from https://github.com/opencv/opencv/releases and unpack it (for example, `opencv-5.X.Y-android-sdk.zip`).
- Download MobileNet object detection model from https://github.com/chuanqi305/MobileNet-SSD. We need a configuration file `MobileNetSSD_deploy.prototxt` and weights `MobileNetSSD_deploy.caffemodel`. - Download MobileNet object detection model from https://github.com/chuanqi305/MobileNet-SSD. We need a configuration file `MobileNetSSD_deploy.prototxt` and weights `MobileNetSSD_deploy.caffemodel`.

View File

@ -524,7 +524,7 @@ Following options can be used to change installation layout for common scenarios
| Option | Default | Description | | Option | Default | Description |
| ------ | ------- | ----------- | | ------ | ------- | ----------- |
| `INSTALL_CREATE_DISTRIB` | _OFF_ | Tune multiple things to produce Windows and Android distributions. | | `INSTALL_CREATE_DISTRIB` | _OFF_ | Tune multiple things to produce Windows and Android distributions. |
| `INSTALL_TO_MANGLED_PATHS` | _OFF_ | Adds one level to several installation locations to allow side-by-side installations. For example, headers will be installed to _/usr/include/opencv-4.4.0_ instead of _/usr/include/opencv4_ with this option enabled. | | `INSTALL_TO_MANGLED_PATHS` | _OFF_ | Adds one level to several installation locations to allow side-by-side installations. For example, headers will be installed to _/usr/include/opencv-5.x.y_ instead of _/usr/include/opencv5_ with this option enabled. |
# Miscellaneous features {#tutorial_config_reference_misc} # Miscellaneous features {#tutorial_config_reference_misc}

View File

@ -46,14 +46,14 @@ Open your Doxyfile using your favorite text editor and search for the key
`TAGFILES`. Change it as follows: `TAGFILES`. Change it as follows:
@code @code
TAGFILES = ./docs/doxygen-tags/opencv.tag=http://docs.opencv.org/4.5.0 TAGFILES = ./docs/doxygen-tags/opencv.tag=http://docs.opencv.org/5.0.0
@endcode @endcode
If you had other definitions already, you can append the line using a `\`: If you had other definitions already, you can append the line using a `\`:
@code @code
TAGFILES = ./docs/doxygen-tags/libstdc++.tag=https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen \ TAGFILES = ./docs/doxygen-tags/libstdc++.tag=https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen \
./docs/doxygen-tags/opencv.tag=http://docs.opencv.org/4.5.0 ./docs/doxygen-tags/opencv.tag=http://docs.opencv.org/5.0.0
@endcode @endcode
Doxygen can now use the information from the tag file to link to the OpenCV Doxygen can now use the information from the tag file to link to the OpenCV

View File

@ -113,9 +113,9 @@ Installation process only copies files to predefined locations and do minor patc
By default OpenCV will be installed to the `/usr/local` directory, all files will be copied to following locations: By default OpenCV will be installed to the `/usr/local` directory, all files will be copied to following locations:
* `/usr/local/bin` - executable files * `/usr/local/bin` - executable files
* `/usr/local/lib` - libraries (.so) * `/usr/local/lib` - libraries (.so)
* `/usr/local/cmake/opencv4` - cmake package * `/usr/local/cmake/opencv5` - cmake package
* `/usr/local/include/opencv4` - headers * `/usr/local/include/opencv5` - headers
* `/usr/local/share/opencv4` - other files (e.g. trained cascades in XML format) * `/usr/local/share/opencv5` - other files (e.g. trained cascades in XML format)
Since `/usr/local` is owned by the root user, the installation should be performed with elevated privileges (`sudo`): Since `/usr/local` is owned by the root user, the installation should be performed with elevated privileges (`sudo`):
@snippet linux_install_a.sh install @snippet linux_install_a.sh install

View File

@ -503,7 +503,7 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu
if (utils::fs::isDirectory(default_cache_path)) if (utils::fs::isDirectory(default_cache_path))
{ {
cv::String default_cache_path_base = utils::fs::join(default_cache_path, "opencv"); cv::String default_cache_path_base = utils::fs::join(default_cache_path, "opencv");
default_cache_path = utils::fs::join(default_cache_path_base, CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) CV_VERSION_STATUS); default_cache_path = utils::fs::join(default_cache_path_base, CVAUX_STR(CV_VERSION_MAJOR) ".x" CV_VERSION_STATUS);
if (utils::getConfigurationParameterBool("OPENCV_CACHE_SHOW_CLEANUP_MESSAGE", true) if (utils::getConfigurationParameterBool("OPENCV_CACHE_SHOW_CLEANUP_MESSAGE", true)
&& !utils::fs::isDirectory(default_cache_path)) && !utils::fs::isDirectory(default_cache_path))
{ {

View File

@ -9,7 +9,7 @@
#define OPENCV_DNN_API_VERSION 20200908 #define OPENCV_DNN_API_VERSION 20200908
#if !defined CV_DOXYGEN && !defined CV_STATIC_ANALYSIS && !defined CV_DNN_DONT_ADD_INLINE_NS #if !defined CV_DOXYGEN && !defined CV_STATIC_ANALYSIS && !defined CV_DNN_DONT_ADD_INLINE_NS
#define CV__DNN_INLINE_NS __CV_CAT(dnn4_v, OPENCV_DNN_API_VERSION) #define CV__DNN_INLINE_NS __CV_CAT(dnn5_v, OPENCV_DNN_API_VERSION)
#define CV__DNN_INLINE_NS_BEGIN namespace CV__DNN_INLINE_NS { #define CV__DNN_INLINE_NS_BEGIN namespace CV__DNN_INLINE_NS {
#define CV__DNN_INLINE_NS_END } #define CV__DNN_INLINE_NS_END }
namespace cv { namespace dnn { namespace CV__DNN_INLINE_NS { } using namespace CV__DNN_INLINE_NS; }} namespace cv { namespace dnn { namespace CV__DNN_INLINE_NS { } using namespace CV__DNN_INLINE_NS; }}

View File

@ -9,7 +9,7 @@ def main():
os.chdir(SCRIPT_DIR) os.chdir(SCRIPT_DIR)
package_name = 'opencv' package_name = 'opencv'
package_version = os.environ.get('OPENCV_VERSION', '4.5.0') # TODO package_version = os.environ.get('OPENCV_VERSION', '5.0.0') # TODO
long_description = 'Open Source Computer Vision Library Python bindings' # TODO long_description = 'Open Source Computer Vision Library Python bindings' # TODO

View File

@ -211,6 +211,7 @@ public:
CV_LOG_INFO(NULL, "Video I/O: plugin is incompatible: " << lib->getName()); CV_LOG_INFO(NULL, "Video I/O: plugin is incompatible: " << lib->getName());
return; return;
} }
#if 0 // FIXIT: OpenCV 5.0
if (plugin_api_->api_header.opencv_version_major != CV_VERSION_MAJOR) if (plugin_api_->api_header.opencv_version_major != CV_VERSION_MAJOR)
{ {
CV_LOG_ERROR(NULL, "Video I/O: wrong OpenCV major version used by plugin '" << plugin_api_->api_header.api_description << "': " << CV_LOG_ERROR(NULL, "Video I/O: wrong OpenCV major version used by plugin '" << plugin_api_->api_header.api_description << "': " <<
@ -232,6 +233,7 @@ public:
plugin_api_ = NULL; plugin_api_ = NULL;
return; return;
} }
#endif
// TODO Preview: add compatibility API/ABI checks // TODO Preview: add compatibility API/ABI checks
CV_LOG_INFO(NULL, "Video I/O: loaded plugin '" << plugin_api_->api_header.api_description << "'"); CV_LOG_INFO(NULL, "Video I/O: loaded plugin '" << plugin_api_->api_header.api_description << "'");
} }

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.opencv</groupId> <groupId>org.opencv</groupId>
<artifactId>opencv-parent</artifactId> <artifactId>opencv-parent</artifactId>
<version>4.5.0</version> <version>5.0.0</version>
</parent> </parent>
<groupId>org.opencv</groupId> <groupId>org.opencv</groupId>
<artifactId>opencv-it</artifactId> <artifactId>opencv-it</artifactId>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>org.opencv</groupId> <groupId>org.opencv</groupId>
<artifactId>opencv-parent</artifactId> <artifactId>opencv-parent</artifactId>
<version>4.5.0</version> <version>5.0.0</version>
</parent> </parent>
<groupId>org.opencv</groupId> <groupId>org.opencv</groupId>
<artifactId>opencv</artifactId> <artifactId>opencv</artifactId>

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.opencv</groupId> <groupId>org.opencv</groupId>
<artifactId>opencv-parent</artifactId> <artifactId>opencv-parent</artifactId>
<version>4.5.0</version> <version>5.0.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>OpenCV Parent POM</name> <name>OpenCV Parent POM</name>
<licenses> <licenses>

View File

@ -10,7 +10,7 @@
setlocal setlocal
SET SCRIPT_DIR=%~dp0 SET SCRIPT_DIR=%~dp0
SET "OPENCV_SETUPVARS_SCRIPT=setup_vars_opencv4.cmd" SET "OPENCV_SETUPVARS_SCRIPT=setup_vars_opencv5.cmd"
SET "PACKAGE_BUILD_DIR=%SCRIPT_DIR%\..\..\build" SET "PACKAGE_BUILD_DIR=%SCRIPT_DIR%\..\..\build"
IF NOT EXIST "%PACKAGE_BUILD_DIR%\%OPENCV_SETUPVARS_SCRIPT%" ( IF NOT EXIST "%PACKAGE_BUILD_DIR%\%OPENCV_SETUPVARS_SCRIPT%" (
:: Winpack DLDT :: Winpack DLDT

View File

@ -2,7 +2,7 @@
SETLOCAL SETLOCAL
SET SCRIPT_DIR=%~dp0 SET SCRIPT_DIR=%~dp0
SET "OPENCV_SETUPVARS_SCRIPT=setup_vars_opencv4.cmd" SET "OPENCV_SETUPVARS_SCRIPT=setup_vars_opencv5.cmd"
SET "BUILD_DIR=%SCRIPT_DIR%\..\..\build" SET "BUILD_DIR=%SCRIPT_DIR%\..\..\build"
IF NOT EXIST "%BUILD_DIR%\%OPENCV_SETUPVARS_SCRIPT%" ( IF NOT EXIST "%BUILD_DIR%\%OPENCV_SETUPVARS_SCRIPT%" (
:: Winpack DLDT :: Winpack DLDT