link_OpenCV.xcpjh
//////////////////// OpenCV //////////////////////
/*
Downloaded 2.4.6 released on 18/July/2013 from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
Downloaded opencv-2.4.9.exe (357MB) from http://sourceforge.net/projects/opencvlibrary/files/opencv-win/
This is a self-extracting 7-zip file.
Relevant directory structure:
opencv
build
include
x64
vc10
bin
lib
staticlib
vc11
bin
lib
staticlib
vc12
bin
lib
staticlib
x86
vc10
vc11
vc12
See http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html
Oct 2016
--------
Downloaded 2.4.13: opencv-2.4.13.exe, size = 273MB, but this only has vc11 and vc12 folders.
Downloaded 3.1.0: opencv-3.1.0.exe, size = 112MB, but this only only has vc12 and vc14 under x64, there is no x86 folder.
Solution is probably to build the libs ourselves (using cmake)
*/
@if (IsWindowsPlatform)
{
$OPENCV_VERSION = "249"
$OPENCV_INCLUDE = "$(PATH_TO_ROOT)/ThirdParty.Ceda/OpenCV/$(OPENCV_VERSION)/opencv/build/include"
//$OPENCV_LIB32 = "$(PATH_TO_ROOT)/ThirdParty.Ceda/OpenCV/$(OPENCV_VERSION)/opencv/build/x86/$(COMPILER)/staticlib"
//$OPENCV_LIB64 = "$(PATH_TO_ROOT)/ThirdParty.Ceda/OpenCV/$(OPENCV_VERSION)/opencv/build/x64/$(COMPILER)/staticlib"
$OPENCV_LIB32 = "$(PATH_TO_ROOT)/ThirdParty.Ceda/OpenCV/$(OPENCV_VERSION)/opencv/build/x86/$(COMPILER)/lib"
$OPENCV_LIB64 = "$(PATH_TO_ROOT)/ThirdParty.Ceda/OpenCV/$(OPENCV_VERSION)/opencv/build/x64/$(COMPILER)/lib"
@def+ OPENCV_LIBNAMES =
{
[
"core",
"imgproc",
"highgui",
"ml",
"video",
"features2d",
"calib3d",
"objdetect",
"contrib",
"legacy",
"flann"
]
}
// 2.4.6
//@assert("$(COMPILER)" == "vc9" || "$(COMPILER)" == "vc10" || "$(COMPILER)" == "vc11")
// 2.4.9
//@assert("$(COMPILER)" == "vc10" || "$(COMPILER)" == "vc11" || "$(COMPILER)" == "vc12")
+cpp
{
/D "CEDA_USING_OPENCV"
/I "$(OPENCV_INCLUDE)"
}
+link("Win32|Debug")
{
@for (s in OPENCV_LIBNAMES)
{
@str(@("$(OPENCV_LIB32)/opencv_" + s + "$(OPENCV_VERSION)d.lib"))
}
}
+link("Win32|Release")
{
@for (s in OPENCV_LIBNAMES)
{
@str(@("$(OPENCV_LIB32)/opencv_" + s + "$(OPENCV_VERSION).lib"))
}
}
+link("x64|Debug")
{
@for (s in OPENCV_LIBNAMES)
{
@str(@("$(OPENCV_LIB64)/opencv_" + s + "$(OPENCV_VERSION)d.lib"))
}
}
+link("x64|Release")
{
@for (s in OPENCV_LIBNAMES)
{
@str(@("$(OPENCV_LIB64)/opencv_" + s + "$(OPENCV_VERSION).lib"))
}
}
}