[CMake] FIND_PATH finds two out of three?

Christopher Harvey chris at basementcode.com
Mon May 18 20:07:12 EDT 2009


I don't know how the ARTK library is installed on linux systems, but you
could add the NO_DEFAULT_PATH option to find_path...chances are it's
looking in a default path and picking up a header in /usr/include before
getting to your specified directories. What makes you think the
/usr/include is bad? The others seem right to me, that's the broken one
right?

eial at cs.bgu.ac.il wrote:
> I'm writing a program which is based on 3 external libs, Poco, ARToolKit and opencv, now the locations in the include folder is has followd:
> opencv headers are in /usr/include/opencv folder, Poco headers are in /usr/include/Poco folder and ARToolKit headers are in /usr/include/AR folder.
> I'm trying to find the folder in which the headers resides, but only two are returned ok, here is the code:
>
> FIND_PATH(ARTK_INCLUDE_DIR ar.h /usr/include/AR /usr/local/include/AR)
> FIND_PATH(OPENCV_INCLUDE_DIR cv.h /usr/include/opencv /usr/local/include/opencv)
> FIND_PATH(POCO_INCLUDE_DIR Poco.h /usr/include/Poco /usr/local/include/Poco)
>
> MESSAGE(STATUS ${ARTK_INCLUDE_DIR})
> MESSAGE(STATUS ${OPENCV_INCLUDE_DIR})
> MESSAGE(STATUS ${POCO_INCLUDE_DIR})
>
> and here is the output: 
>
> -- /usr/include
> -- /usr/include/opencv
> -- /usr/include/Poco
>
> how can I fix this?
>
> thanks.
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>   



More information about the CMake mailing list