[CMake] CMake + OpenCV + Visial Studio 2005 (V8)

Dario Figueira wurmdario at gmail.com
Fri Feb 29 15:43:30 EST 2008


Dear Philip,

Didn't work :S, other considerations aside,
adding INCLUDE_DIRECTORIES(${OPENCV_INCLUDE_DIR_CV})
and confirming in the CMake GUI that OPENCV_INCLUDE_DIR_CV does point to the
correct location, Visual Studio still complains that it cannot find the
sought for 'cv.h'
"fatal error C1083: Cannot open include file: 'cv.h': No such file or
directory"

Thank you for your time tho =), any other ideas?

On 2/29/08, Philip Lowman <philip at yhbt.com> wrote:
>
> On Fri, Feb 29, 2008 at 2:59 PM, Dario Figueira <wurmdario at gmail.com>
> wrote:
>
> > In the CMakeLists: FIND_PACKAGE(OPENCV REQUIRED)
> >
> > CMake runs smoothly, but when VS tries to compile, it can't find by
> > itself where, for instance, cv.h is
> > By manually adding to VS VC++ include directories where the OpenCV
> > includes are (which CMake knows, for instance, in the OPENCV_
> > INCLUDE_DIR_CV variable, that is well filled automaticly by CMake),
> > things work.
> >
> > I was wondering if this manual step could be avoided, am i missing
> > something?
>
>
> Dario,
>
> When FIND_PACKAGE(OPENCV REQUIRED) is called that should invoke the
> FindOPENCV.cmake file which I'm assuming is somewhere in your source
> tree.  This file will attempt to find the OPENCV include path (i.e. where
> it's header files are) and perhaps other things (not sure what OPENCV is, so
> I can't speculate).
>
> If after configuring with CMakeSetup you see an OPENCV_INCLUDE_DIR_CV
> variable in the cache that likely needs to be pointed to where the cv.hfile is.  Assuming that that variable is being pointed to the proper
> location of where OPENCV is, you'll need to make sure that somewhere in the
> CMakeLists.txt file after the FIND_PACKAGE(OPENCV REQUIRED) line that you
> call:
>
> INCLUDE_DIRECTORIES(${OPENCV_INCLUDE_DIR_CV})
>
> (This assumes that you're OK with adding OPENCV to your include path for
> all of your targets)
>
>
>
> --
> Philip Lowman




-- 
Dario Figueira - IST nº 54545 - Delegado 5º Ano de MEEC
no google ^^ wurmdario at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20080229/c00f1643/attachment.html


More information about the CMake mailing list