-SET(OpenCV_VERSION @OPENCV_VERSION@)\r
-SET(OpenCV_VERSION_MAJOR @OPENCV_VERSION_MAJOR@)\r
-SET(OpenCV_VERSION_MINOR @OPENCV_VERSION_MINOR@)\r
-SET(OpenCV_VERSION_PATCH @OPENCV_VERSION_PATCH@)\r
+set(OpenCV_VERSION @OPENCV_VERSION@)\r
set(PACKAGE_VERSION ${OpenCV_VERSION})\r
-if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL ${OpenCV_VERSION_MAJOR})\r
- set(PACKAGE_VERSION_COMPATIBLE True) # compatible with any version @OPENCV_VERSION_MAJOR@.x.x\r
- if("${PACKAGE_FIND_VERSION_MINOR}" EQUAL ${OpenCV_VERSION_MINOR})\r
- set(PACKAGE_VERSION_COMPATIBLE True) # compatible with any version @OPENCV_VERSION_MAJOR@.@OPENCV_VERSION_MINOR@.x\r
- if("${PACKAGE_FIND_VERSION_PATCH}" EQUAL ${OpenCV_VERSION_PATCH})\r
- set(PACKAGE_VERSION_EXACT True) # exact match for patch @OPENCV_VERSION_MAJOR@.@OPENCV_VERSION_MINOR@.@OPENCV_VERSION_PATCH@\r
- endif()\r
- endif()\r
+\r
+set(PACKAGE_VERSION_EXACT False)\r
+set(PACKAGE_VERSION_COMPATIBLE False)\r
+\r
+if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})\r
+ set(PACKAGE_VERSION_EXACT True)\r
+ set(PACKAGE_VERSION_COMPATIBLE True)\r
+endif()\r
+\r
+if(${PACKAGE_FIND_VERSION} VERSION_LESS ${PACKAGE_VERSION})\r
+ set(PACKAGE_VERSION_COMPATIBLE True)\r
endif()\r
--- /dev/null
+# Package Information for pkg-config
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir_old=@includedir@/opencv
+includedir_new=@includedir@
+
+Name: OpenCV
+Description: Open Source Computer Vision Library
+Version: @VERSION@
+Libs: @OpenCV_LIB_COMPONENTS@
+Cflags: -I${includedir_old} -I${includedir_new}