On Fri, Feb 29, 2008 at 2:59 PM, Dario Figueira <<a href="mailto:wurmdario@gmail.com">wurmdario@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In the CMakeLists: FIND_PACKAGE(OPENCV REQUIRED)<br><br>CMake runs smoothly, but when VS tries to compile, it can't find by itself where, for instance, cv.h is<br>By manually adding to VS VC++ include directories where the OpenCV includes are (which CMake knows, for instance, in the OPENCV_<br clear="all">
INCLUDE_DIR_CV variable, that is well filled automaticly by CMake), things work.<br><br>I was wondering if this manual step could be avoided, am i missing something?</blockquote><div><br>Dario,<br><br>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).<br>
<br>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.h file 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:<br>
<br>INCLUDE_DIRECTORIES(${OPENCV_INCLUDE_DIR_CV})<br><br>(This assumes that you're OK with adding OPENCV to your include path for all of your targets)<br><br><br></div></div><br>-- <br>Philip Lowman