Hi,

On Tue, Oct 9, 2012 at 3:46 PM, Fabio Fracassi
<fabio.fraca...@charite.de> wrote:
> Hello,
>
> I am using find_package in Module mode for a Library that is also build
> using cmake.
> The Library is build in a way that it can be used both from the build dir,
> and from the installed location.
>
> When using find_package it always seems to prefer the build dir version,
> which is somewhat surprising since I expect the default to be the
> (supposably more stable) installed version and that the build dir version
> (that could be broken at any time) needs some explicit interaction.
>
> Is the current state the way it is supposed to be? Can I force CMake to do
> what I want?

Unless you happen to build in /usr or /usr/local CMake won't
automatically find packages in module mode, so you must already be
doing something to have cmake find the module from the builddir first.
The documentation of the find_package function (cmake --help-command
find_package) has quite extensive documentation about the paths that
are being searched and their order.

Whats your find_package call? Check which of the variables mentioned
in the find_package docs are set before the find_package call.

Andreas
--

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