Hello,<br><br>I&#39;m having some trouble to use a cmake script correctly and i don&#39;t know why.<br>The cmake script come from the openCV library (you can find it here: <a href="http://opencv.willowgarage.com/wiki/Getting_started?action=AttachFile&amp;do=get&amp;target=FindOpenCV.cmake">http://opencv.willowgarage.com/wiki/Getting_started?action=AttachFile&amp;do=get&amp;target=FindOpenCV.cmake</a>) and it search for include and library files.<br>
<br>In this script you can setup the path where you want to look for these files, (or let the script search the default path).<br>The problem is that if i have to version of openCV (one in the default path and one in a special path), it alway select me the default path.<br>
<br>Here you have the important part of the script: <br><br>----------------------------------------------------- <br><br>MESSAGE(STATUS &quot;OpenCV_POSSIBLE_ROOT_DIRS=${OpenCV_POSSIBLE_ROOT_DIRS}&quot;)
<br> <br>FIND_PATH(OpenCV_ROOT_DIR 
<br>  NAMES 
<br>  cv/include/cv.h     # windows
<br>  include/opencv/cv.h # linux /opt/net
<br>  include/cv/cv.h 
<br>  include/cv.h 
<br>  PATHS ${OpenCV_POSSIBLE_ROOT_DIRS})<br> <br>MESSAGE(STATUS &quot;Selected OpenCV_ROOT_DIR=${OpenCV_ROOT_DIR}&quot;)
<br><br>SET(OpenCV_INCDIR_SUFFIXES
<br>  include
<br>  include/cv
<br>  include/opencv
<br>  cv/include
<br>  cxcore/include
<br>  cvaux/include
<br>  otherlibs/cvcam/include
<br>  otherlibs/highgui
<br>  otherlibs/highgui/include
<br>  otherlibs/_graphics/include
<br>  )
<br><br> <br>MESSAGE(STATUS &quot;OpenCV_HIGHGUI_INCLUDE_DIR=${OpenCV_HIGHGUI_INCLUDE_DIR} ; root=${OpenCV_ROOT_DIR}&quot;)<br><br>FIND_PATH(OpenCV_HIGHGUI_INCLUDE_DIR  
<br>  NAMES highgui.h 
<br>  PATHS ${OpenCV_ROOT_DIR} 
<br>  PATH_SUFFIXES ${OpenCV_INCDIR_SUFFIXES} )<br><br> MESSAGE(STATUS &quot;OpenCV_HIGHGUI_INCLUDE_DIR=${OpenCV_HIGHGUI_INCLUDE_DIR} ${OpenCV_ROOT_DIR}&quot;)<br><br>-----------------------------------------------------<br>
<br><br>And here you have the first execution of cmake script when the cache empty.<br><br>
<meta name="qrichtext" content="1"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;">OpenCV_POSSIBLE_ROOT_DIRS=/opt/opencv/1.1.0;usr/local;/usr;</p>
<p style="margin: 0px; text-indent: 0px;">Selected OpenCV_ROOT_DIR=/opt/opencv/1.1.0</p>
<p style="margin: 0px; text-indent: 0px;">OpenCV_HIGHGUI_INCLUDE_DIR= ; root=/opt/opencv/1.1.0</p>
<p style="margin: 0px; text-indent: 0px;">OpenCV_HIGHGUI_INCLUDE_DIR=/usr/include/opencv ; root=/opt/opencv/1.1.0</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">
<br></p>-----------------------------------------------------<br>
<br>Does anyone know why the result of OpenCV_HIGHGUI_INCLUDE_DIR=/usr/include/opencv and not /opt/opencv/1.1.0/include/opencv <br>even if both files /opt/opencv/1.1.0/include/opencv/highgui.h and/usr/include/opencv/highgui.h  exist in my path.<br>
<br><br clear="all"><br>--<br>Benoit RAT<br><a href="http://www.neub.co.nr">www.neub.co.nr</a><br>