mirror of
https://github.com/opencv/opencv.git
synced 2024-12-21 05:28:01 +08:00
932043fdc2
If I ask for version 2, the current trunk version (version 3), will say it is compatible, which is erroneous. Do not consider different major versions compatible in cmake config file
16 lines
456 B
CMake
16 lines
456 B
CMake
set(OpenCV_VERSION @OPENCV_VERSION_PLAIN@)
|
|
set(PACKAGE_VERSION ${OpenCV_VERSION})
|
|
|
|
set(PACKAGE_VERSION_EXACT False)
|
|
set(PACKAGE_VERSION_COMPATIBLE False)
|
|
|
|
if(PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
|
|
set(PACKAGE_VERSION_EXACT True)
|
|
set(PACKAGE_VERSION_COMPATIBLE True)
|
|
endif()
|
|
|
|
if(PACKAGE_FIND_VERSION_MAJOR EQUAL @OPENCV_VERSION_MAJOR@
|
|
AND PACKAGE_FIND_VERSION VERSION_LESS PACKAGE_VERSION)
|
|
set(PACKAGE_VERSION_COMPATIBLE True)
|
|
endif()
|