auto_library_linking.patch

Kazuki Matsuda, 2012-10-09 05:27 pm

Download (15.8 kB)

 
b/modules/calib3d/include/opencv2/calib3d/calib3d.hpp
748 748

  
749 749
#endif
750 750

  
751
// Auto linking by "#pragma comment(lib)" syntax
752
#include "opencv2/core/pragma_lib.hpp"
753
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
754
#pragma OPENCV_COMMENT_LIB_FNAME("calib3d")
755
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
756

  
751 757
#endif
b/modules/contrib/include/opencv2/contrib/contrib.hpp
970 970

  
971 971
#endif
972 972

  
973
#endif
973
// Auto linking by "#pragma comment(lib)" syntax
974
#include "opencv2/core/pragma_lib.hpp"
975
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
976
#pragma OPENCV_COMMENT_LIB_FNAME("contrib")
977
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
974 978

  
979
#endif
b/modules/core/include/opencv2/core/core.hpp
4643 4643
#include "opencv2/core/operations.hpp"
4644 4644
#include "opencv2/core/mat.hpp"
4645 4645

  
4646
// Auto linking by "#pragma comment(lib)" syntax
4647
#include "opencv2/core/pragma_lib.hpp"
4648
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
4649
#pragma OPENCV_COMMENT_LIB_FNAME("core")
4650
#endif
4651

  
4646 4652
#endif /*__OPENCV_CORE_HPP__*/
b/modules/core/include/opencv2/core/pragma_lib.hpp
1
/*! \file pragma_include.hpp
2
    \brief #pragmas for auto library linking
3
 */
4
/*M///////////////////////////////////////////////////////////////////////////////////////
5
//
6
//  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
7
//
8
//  By downloading, copying, installing or using the software you agree to this license.
9
//  If you do not agree to this license, do not download, install,
10
//  copy or use the software.
11
//
12
//
13
//                           License Agreement
14
//                For Open Source Computer Vision Library
15
//
16
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
17
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
18
// Third party copyrights are property of their respective owners.
19
//
20
// Redistribution and use in source and binary forms, with or without modification,
21
// are permitted provided that the following conditions are met:
22
//
23
//   * Redistribution's of source code must retain the above copyright notice,
24
//     this list of conditions and the following disclaimer.
25
//
26
//   * Redistribution's in binary form must reproduce the above copyright notice,
27
//     this list of conditions and the following disclaimer in the documentation
28
//     and/or other materials provided with the distribution.
29
//
30
//   * The name of the copyright holders may not be used to endorse or promote products
31
//     derived from this software without specific prior written permission.
32
//
33
// This software is provided by the copyright holders and contributors "as is" and
34
// any express or implied warranties, including, but not limited to, the implied
35
// warranties of merchantability and fitness for a particular purpose are disclaimed.
36
// In no event shall the Intel Corporation or contributors be liable for any direct,
37
// indirect, incidental, special, exemplary, or consequential damages
38
// (including, but not limited to, procurement of substitute goods or services;
39
// loss of use, data, or profits; or business interruption) however caused
40
// and on any theory of liability, whether in contract, strict liability,
41
// or tort (including negligence or otherwise) arising in any way out of
42
// the use of this software, even if advised of the possibility of such damage.
43
//
44
//M*/
45

  
46
#ifndef __OPENCV_PRAGMA_LIB_HPP__
47
#define __OPENCV_PRAGMA_LIB_HPP__ 1
48

  
49
#if (defined(_MSC_VER) && !defined(PRAGMA_COMMENT_SUPPORT)) \
50
  && !defined(CVAPI_EXPORTS)
51
#define PRAGMA_COMMENT_SUPPORT 1
52
#elif !defined(PRAGMA_COMMENT_SUPPORT)
53
#define PRAGMA_COMMENT_SUPPORT 0
54
#endif
55

  
56
#ifndef CV_MAJOR_VERSION
57
#pragma message("WARM: Any OpenCV header included before pragma_lib.hpp")
58
#include "opencv2/core/version.hpp"
59
#endif
60

  
61
// version string which contains in library's file name such as "232"
62
#define OPENCV_LIBVERSTR \
63
  CVAUX_STR(CV_MAJOR_VERSION) \
64
  CVAUX_STR(CV_MINOR_VERSION) \
65
  CVAUX_STR(CV_SUBMINOR_VERSION)
66

  
67
// generate #pragma arguments string
68
#ifndef _DEBUG // Release
69
#define OPENCV_COMMENT_LIB_FNAME(name) \
70
comment(lib, "opencv_" name OPENCV_LIBVERSTR ".lib")
71
#else          // Debug
72
#define OPENCV_COMMENT_LIB_FNAME(name) \
73
comment(lib, "opencv_" name OPENCV_LIBVERSTR "d.lib")
74
#endif
75

  
76
// defined macro search,
77
// OPENCV_DEFINE_SEARCH(modulename) is only true
78
// when header file of modulename is included.
79
#define OPENCV_DEFINE_SEARCH(modulename) \
80
  ( \
81
  defined( __OPENCV_##modulename##_HPP__ )        || \
82
  defined(  _OPENCV_##modulename##_HPP_ )         || \
83
  defined( __OPENCV_##modulename##_H__ )          || \
84
  defined( __OPENCV_##modulename##_##name##_C_H ) \
85
  )
86

  
87
#ifndef OPENCV_AUTO_LINK
88
#define OPENCV_AUTO_LINK 1
89
#endif
90

  
91
#endif // #ifndef __OPENCV_PRAGMA_LIB_HPP__
b/modules/features2d/include/opencv2/features2d/features2d.hpp
1602 1602

  
1603 1603
#endif /* __cplusplus */
1604 1604

  
1605
// Auto linking by "#pragma comment(lib)" syntax
1606
#include "opencv2/core/pragma_lib.hpp"
1607
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
1608
#pragma OPENCV_COMMENT_LIB_FNAME("features2d")
1609
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
1610

  
1605 1611
#endif
1606 1612

  
1607 1613
/* End of file. */
b/modules/flann/include/opencv2/flann/flann.hpp
40 40
//
41 41
//M*/
42 42

  
43
#ifndef _OPENCV_FLANN_HPP_
44
#define _OPENCV_FLANN_HPP_
43
#ifndef __OPENCV_FLANN_HPP__
44
#define __OPENCV_FLANN_HPP__
45 45

  
46 46
#ifdef __cplusplus
47 47

  
......
424 424

  
425 425
#endif // __cplusplus
426 426

  
427
// Auto linking by "#pragma comment(lib)" syntax
428
#include "opencv2/core/pragma_lib.hpp"
429
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
430
#pragma OPENCV_COMMENT_LIB_FNAME("flann")
431
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
432

  
427 433
#endif
b/modules/gpu/include/opencv2/gpu/gpu.hpp
871 871

  
872 872
//! finds arbitrary template in the grayscale image using Generalized Hough Transform
873 873
//! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.
874
//! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
874
//! Guil, N., Gonzalez-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
875 875
class CV_EXPORTS GeneralizedHough_GPU : public Algorithm
876 876
{
877 877
public:
......
2495 2495

  
2496 2496
} // namespace cv
2497 2497

  
2498
// Auto linking by "#pragma comment(lib)" syntax
2499
#include "opencv2/core/pragma_lib.hpp"
2500
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
2501
#pragma OPENCV_COMMENT_LIB_FNAME("gpu")
2502
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
2503

  
2498 2504
#endif /* __OPENCV_GPU_HPP__ */
b/modules/highgui/include/opencv2/highgui/highgui.hpp
250 250

  
251 251
#endif
252 252

  
253
// Auto linking by "#pragma comment(lib)" syntax
254
#include "opencv2/core/pragma_lib.hpp"
255
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
256
#pragma OPENCV_COMMENT_LIB_FNAME("highgui")
257
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
258

  
253 259
#endif
b/modules/imgproc/include/opencv2/imgproc/imgproc.hpp
498 498

  
499 499
//! finds arbitrary template in the grayscale image using Generalized Hough Transform
500 500
//! Ballard, D.H. (1981). Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition 13 (2): 111-122.
501
//! Guil, N., González-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
501
//! Guil, N., Gonzalez-Linares, J.M. and Zapata, E.L. (1999). Bidimensional shape detection using an invariant approach. Pattern Recognition 32 (6): 1025-1038.
502 502
class CV_EXPORTS GeneralizedHough : public Algorithm
503 503
{
504 504
public:
......
1258 1258

  
1259 1259
#endif /* __cplusplus */
1260 1260

  
1261
// Auto linking by "#pragma comment(lib)" syntax
1262
#include "opencv2/core/pragma_lib.hpp"
1263
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
1264
#pragma OPENCV_COMMENT_LIB_FNAME("imgproc")
1265
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
1266

  
1261 1267
#endif
1262 1268

  
1263 1269
/* End of file. */
b/modules/legacy/include/opencv2/legacy/legacy.hpp
3499 3499
}
3500 3500
#endif
3501 3501

  
3502
// Auto linking by "#pragma comment(lib)" syntax
3503
#include "opencv2/core/pragma_lib.hpp"
3504
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
3505
#pragma OPENCV_COMMENT_LIB_FNAME("legacy")
3506
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
3507

  
3502 3508
#endif
3503 3509

  
3504 3510
/* End of file. */
b/modules/ml/include/opencv2/ml/ml.hpp
2134 2134
#endif // __cplusplus
2135 2135
#endif // __OPENCV_ML_HPP__
2136 2136

  
2137
// Auto linking by "#pragma comment(lib)" syntax
2138
#include "opencv2/core/pragma_lib.hpp"
2139
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
2140
#pragma OPENCV_COMMENT_LIB_FNAME("ml")
2141
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
2142

  
2137 2143
/* End of file. */
b/modules/nonfree/include/opencv2/nonfree/nonfree.hpp
52 52
    
53 53
}
54 54

  
55
// Auto linking by "#pragma comment(lib)" syntax
56
#include "opencv2/core/pragma_lib.hpp"
57
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
58
#pragma OPENCV_COMMENT_LIB_FNAME("nonfree")
59
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
60

  
55 61
#endif
56 62

  
57 63
/* End of file. */
b/modules/objdetect/include/opencv2/objdetect/objdetect.hpp
1053 1053

  
1054 1054
#endif
1055 1055

  
1056
// Auto linking by "#pragma comment(lib)" syntax
1057
#include "opencv2/core/pragma_lib.hpp"
1058
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
1059
#pragma OPENCV_COMMENT_LIB_FNAME("objdetect")
1060
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
1061

  
1056 1062
#endif
b/modules/photo/include/opencv2/photo/photo.hpp
88 88

  
89 89
#endif //__cplusplus
90 90

  
91
// Auto linking by "#pragma comment(lib)" syntax
92
#include "opencv2/core/pragma_lib.hpp"
93
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
94
#pragma OPENCV_COMMENT_LIB_FNAME("photo")
95
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
96

  
91 97
#endif
b/modules/stitching/include/opencv2/stitching/stitcher.hpp
171 171

  
172 172
} // namespace cv
173 173

  
174
// Auto linking by "#pragma comment(lib)" syntax
175
#include "opencv2/core/pragma_lib.hpp"
176
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
177
#pragma OPENCV_COMMENT_LIB_FNAME("stitching")
178
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
179

  
174 180
#endif // __OPENCV_STITCHING_STITCHER_HPP__
b/modules/ts/include/opencv2/ts/ts.hpp
580 580

  
581 581
#endif
582 582

  
583
// Auto linking by "#pragma comment(lib)" syntax
584
#include "opencv2/core/pragma_lib.hpp"
585
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
586
#pragma OPENCV_COMMENT_LIB_FNAME("ts")
587
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
588

  
583 589
#include "ts_perf.hpp"
b/modules/videostab/include/opencv2/videostab/videostab.hpp
52 52
#include "opencv2/videostab/stabilizer.hpp"
53 53
#include "opencv2/videostab/ring_buffer.hpp"
54 54

  
55
// Auto linking by "#pragma comment(lib)" syntax
56
#include "opencv2/core/pragma_lib.hpp"
57
#if PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
58
#pragma OPENCV_COMMENT_LIB_FNAME("videostab")
59
#endif // PRAGMA_COMMENT_SUPPORT && OPENCV_AUTO_LINK
60

  
55 61
#endif