On 30.03.09 17:10:10, Allen Gooch wrote:
> When I run it, the messages indicate that my FindExpat is being used,
> instead of the one installed by cmake in
> /usr/local/share/cmake-2.7/Modules/FindEXPAT.cmake, however my logging out
> of the Expat_INCLUDE_DIR and Expat_LIBRARY values indicate that sytem
> libraries are being found instead of the ones in our src tree.  Below is my
> FindExpat.cmake file contents:
> 
> # BEGIN FindExpat.cmake
> message (STATUS "Finding Expat in global dir: ${GlobalExternalDir}")
> 
> find_path (Expat_INCLUDE_DIR
>   NAMES expat.h
>   PATHS ${GlobalExternalDir}/expat/expat-2.0.1/lib

The reason is that you're using PATHS. If you look at the documentation of
find_path and find_library you'll notice that the order is:

1. dirs listed via the HINTS option
2. system directories (in /usr, /usr/local, C:\Program Files etc)
3. dirs listed via the PATHS option

(I think there's a 4. but can't recall it right now).

So change PATHS to HINTS and then your local version should be preferred.

Andreas

-- 
You will be the last person to buy a Chrysler.
_______________________________________________
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

Reply via email to