Version modifications.
authorEthan Rublee <no@email>
Fri, 1 Jul 2011 01:25:27 +0000 (01:25 +0000)
committerEthan Rublee <no@email>
Fri, 1 Jul 2011 01:25:27 +0000 (01:25 +0000)
OpenCVConfig-version.cmake.in
opencv-XXX.pc.cmake.in [new file with mode: 0644]

index 35c105f..b08dbf7 100644 (file)
@@ -1,14 +1,14 @@
-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
diff --git a/opencv-XXX.pc.cmake.in b/opencv-XXX.pc.cmake.in
new file mode 100644 (file)
index 0000000..4f6415c
--- /dev/null
@@ -0,0 +1,13 @@
+# 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}