]> rtime.felk.cvut.cz Git - opencv.git/blob - opencv/OpenCVConfig.cmake.in
More tags handled, go becomes buildall
[opencv.git] / opencv / OpenCVConfig.cmake.in
1 # ===================================================================================\r
2 #  The OpenCV CMake configuration file\r
3 #\r
4 #             ** File generated automatically, do not modify **\r
5 #\r
6 #  Usage from an external project: \r
7 #    In your CMakeLists.txt, add these lines:\r
8 #\r
9 #    FIND_PACKAGE(OpenCV REQUIRED )\r
10 #    TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${OpenCV_LIBS})   \r
11 #\r
12 #    This file will define the following variables:\r
13 #      - OpenCV_LIBS          : The list of libraries to links against.\r
14 #      - OpenCV_LIB_DIR       : The directory where lib files are. Calling LINK_DIRECTORIES\r
15 #                                with this path is NOT needed.\r
16 #      - OpenCV_INCLUDE_DIRS  : The OpenCV include directories.
17 #      - OpenCV_VERSION       : The  version of this OpenCV build. Example: "1.2.0"\r
18 #      - OpenCV_VERSION_MAJOR : Major version part of OpenCV_VERSION. Example: "1"\r
19 #      - OpenCV_VERSION_MINOR : Minor version part of OpenCV_VERSION. Example: "2"\r
20 #      - OpenCV_VERSION_PATCH : Patch version part of OpenCV_VERSION. Example: "0"\r
21 #\r
22 # ===================================================================================\r
23 \r
24 \r
25 # Extract the directory where *this* file has been installed (determined at cmake run-time)\r
26 #  This variable may or may not be used below, depending on the parsing of OpenCVConfig.cmake\r
27 get_filename_component(THIS_OPENCV_CONFIG_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)\r
28 \r
29 # ======================================================\r
30 # Include directories to add to the user project:\r
31 # ======================================================\r
32 INCLUDE_DIRECTORIES(@CMAKE_INCLUDE_DIRS_CONFIGCMAKE@)\r
33 # Provide the include directories to the caller
34 SET(OpenCV_INCLUDE_DIRS @CMAKE_INCLUDE_DIRS_CONFIGCMAKE@)
35 \r
36 # ======================================================\r
37 # Link directories to add to the user project:\r
38 # ======================================================\r
39 LINK_DIRECTORIES("@CMAKE_LIB_DIRS_CONFIGCMAKE@")\r
40 # Provide the libs directory anyway, it may be needed in some cases.\r
41 SET(OpenCV_LIB_DIR "@CMAKE_LIB_DIRS_CONFIGCMAKE@")\r
42 \r
43 # ====================================================================\r
44 # Link libraries: e.g.   cxcore110.so, cv110.lib / cv110d.lib, etc...\r
45 # ====================================================================\r
46 set(OPENCV_LIB_COMPONENTS cxcore cv ml highgui cvaux)\r
47 SET(OpenCV_LIBS "")\r
48 foreach(__CVLIB ${OPENCV_LIB_COMPONENTS})\r
49         # CMake>=2.6 supports the notation "debug XXd optimized XX"\r
50         if (CMAKE_MAJOR_VERSION GREATER 2  OR  CMAKE_MINOR_VERSION GREATER 4)\r
51                 # Modern CMake:\r
52                 SET(OpenCV_LIBS ${OpenCV_LIBS} debug ${__CVLIB}@OPENCV_DLLVERSION@@OPENCV_DEBUG_POSTFIX@ optimized ${__CVLIB}@OPENCV_DLLVERSION@)\r
53         else(CMAKE_MAJOR_VERSION GREATER 2  OR  CMAKE_MINOR_VERSION GREATER 4)\r
54                 # Old CMake:\r
55                 SET(OpenCV_LIBS ${OpenCV_LIBS} ${__CVLIB}@OPENCV_DLLVERSION@)\r
56         endif(CMAKE_MAJOR_VERSION GREATER 2  OR  CMAKE_MINOR_VERSION GREATER 4)\r
57 endforeach(__CVLIB)
58
59 # For OpenCV built as static libs, we need the user to link against 
60 #  many more dependencies:
61 IF (NOT @OPENCV_BUILD_SHARED_LIB@)
62         # Under static libs, the user of OpenCV needs access to the 3rdparty libs as well:
63         LINK_DIRECTORIES("@CMAKE_BINARY_DIR@/3rdparty/lib")
64 \r
65         SET(OpenCV_LIBS 
66                 @OPENCV_LINKER_LIBS@ 
67                 @IPP_LIBS@
68                 @JPEG_LIBRARIES@ 
69                 @PNG_LIBRARIES@ 
70                 @TIFF_LIBRARIES@ 
71                 @JASPER_LIBRARIES@ 
72                 @HIGHGUI_LIBRARIES@ 
73                 ${OpenCV_LIBS}) # The standard libs BEFORE (OpenCV_LIBS) since these can have "debug","optimized".\r
74 ENDIF(NOT @OPENCV_BUILD_SHARED_LIB@)
75
76 \r
77 # ======================================================\r
78 #  Version variables: \r
79 # ======================================================\r
80 SET(OpenCV_VERSION @OPENCV_VERSION@)\r
81 SET(OpenCV_VERSION_MAJOR  @OPENCV_VERSION_MAJOR@)\r
82 SET(OpenCV_VERSION_MINOR  @OPENCV_VERSION_MINOR@)\r
83 SET(OpenCV_VERSION_PATCH  @OPENCV_VERSION_PATCH@)\r