]> rtime.felk.cvut.cz Git - opencv.git/blobdiff - opencv/OpenCVConfig.cmake.in
another warning fixed
[opencv.git] / opencv / OpenCVConfig.cmake.in
index b3109ad5b010b7f0786ece8402d6941f1d23f4fc..b25f00c4f26c3f91d31a0e1385c9c1e7e701a974 100644 (file)
@@ -1,31 +1,83 @@
-# =========================================================================
-#  The OpenCV CMake configuration file
-#
-#             ** File generated automatically, do not modify **
-#
-#  Usage from an external project: 
-#    In your CMakeLists.txt, add these lines:
-#
-#    FIND_PACKAGE(OpenCV REQUIRED )
-#    TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${OpenCV_LIBS})   
-#
-#    This file will define the following variables:
-#      - OpenCV_LIBS: The list of libraries to links against.
-#
-# =========================================================================
+# ===================================================================================\r
+#  The OpenCV CMake configuration file\r
+#\r
+#             ** File generated automatically, do not modify **\r
+#\r
+#  Usage from an external project: \r
+#    In your CMakeLists.txt, add these lines:\r
+#\r
+#    FIND_PACKAGE(OpenCV REQUIRED )\r
+#    TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${OpenCV_LIBS})   \r
+#\r
+#    This file will define the following variables:\r
+#      - OpenCV_LIBS          : The list of libraries to links against.\r
+#      - OpenCV_LIB_DIR       : The directory where lib files are. Calling LINK_DIRECTORIES\r
+#                                with this path is NOT needed.\r
+#      - OpenCV_INCLUDE_DIRS  : The OpenCV include directories.
+#      - OpenCV_VERSION       : The  version of this OpenCV build. Example: "1.2.0"\r
+#      - OpenCV_VERSION_MAJOR : Major version part of OpenCV_VERSION. Example: "1"\r
+#      - OpenCV_VERSION_MINOR : Minor version part of OpenCV_VERSION. Example: "2"\r
+#      - OpenCV_VERSION_PATCH : Patch version part of OpenCV_VERSION. Example: "0"\r
+#\r
+# ===================================================================================\r
+\r
+\r
+# Extract the directory where *this* file has been installed (determined at cmake run-time)\r
+#  This variable may or may not be used below, depending on the parsing of OpenCVConfig.cmake\r
+get_filename_component(THIS_OPENCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)\r
+\r
+# ======================================================\r
+# Include directories to add to the user project:\r
+# ======================================================\r
+INCLUDE_DIRECTORIES(@CMAKE_INCLUDE_DIRS_CONFIGCMAKE@)\r
+# Provide the include directories to the caller
+SET(OpenCV_INCLUDE_DIRS @CMAKE_INCLUDE_DIRS_CONFIGCMAKE@)
+\r
+# ======================================================\r
+# Link directories to add to the user project:\r
+# ======================================================\r
+LINK_DIRECTORIES("@CMAKE_LIB_DIRS_CONFIGCMAKE@")\r
+# Provide the libs directory anyway, it may be needed in some cases.\r
+SET(OpenCV_LIB_DIR "@CMAKE_LIB_DIRS_CONFIGCMAKE@")\r
+\r
+# ====================================================================\r
+# Link libraries: e.g.   cxcore110.so, cv110.lib / cv110d.lib, etc...\r
+# ====================================================================\r
+set(OPENCV_LIB_COMPONENTS cxcore cv ml highgui cvaux)\r
+SET(OpenCV_LIBS "")\r
+foreach(__CVLIB ${OPENCV_LIB_COMPONENTS})\r
+       # CMake>=2.6 supports the notation "debug XXd optimized XX"\r
+       if (CMAKE_MAJOR_VERSION GREATER 2  OR  CMAKE_MINOR_VERSION GREATER 4)\r
+               # Modern CMake:\r
+               SET(OpenCV_LIBS ${OpenCV_LIBS} debug ${__CVLIB}@OPENCV_DLLVERSION@@OPENCV_DEBUG_POSTFIX@ optimized ${__CVLIB}@OPENCV_DLLVERSION@)\r
+       else(CMAKE_MAJOR_VERSION GREATER 2  OR  CMAKE_MINOR_VERSION GREATER 4)\r
+               # Old CMake:\r
+               SET(OpenCV_LIBS ${OpenCV_LIBS} ${__CVLIB}@OPENCV_DLLVERSION@)\r
+       endif(CMAKE_MAJOR_VERSION GREATER 2  OR  CMAKE_MINOR_VERSION GREATER 4)\r
+endforeach(__CVLIB)
 
+# For OpenCV built as static libs, we need the user to link against 
+#  many more dependencies:
+IF (NOT @OPENCV_BUILD_SHARED_LIB@)
+       # Under static libs, the user of OpenCV needs access to the 3rdparty libs as well:
+       LINK_DIRECTORIES("@CMAKE_BINARY_DIR@/3rdparty/lib")
+\r
+       SET(OpenCV_LIBS 
+               @OPENCV_LINKER_LIBS@ 
+               @IPP_LIBS@
+               @JPEG_LIBRARIES@ 
+               @PNG_LIBRARIES@ 
+               @TIFF_LIBRARIES@ 
+               @JASPER_LIBRARIES@ 
+               @HIGHGUI_LIBRARIES@ 
+               ${OpenCV_LIBS}) # The standard libs BEFORE (OpenCV_LIBS) since these can have "debug","optimized".\r
+ENDIF(NOT @OPENCV_BUILD_SHARED_LIB@)
 
-# ======================================================
-# Include directories to add to the user project:
-# ======================================================
-INCLUDE_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/include/opencv/)
-
-# ======================================================
-# Link directories to add to the user project:
-# ======================================================
-LINK_DIRECTORIES(${CMAKE_INSTALL_PREFIX}/lib)
-
-# ======================================================
-# Link libraries:
-# ======================================================
-SET(OpenCV_LIBS cxcore cv ml highgui cvaux)
+\r
+# ======================================================\r
+#  Version variables: \r
+# ======================================================\r
+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