[CMake] Skipping PATH when using find_library

Philip Lowman philip at yhbt.com
Fri Mar 12 09:51:34 EST 2010


On Thu, Mar 11, 2010 at 3:00 AM,  <Mika.Rajala at patria.fi> wrote:
> More reading documentation and attempts... but still not working.
>
> Maybe there is no way?

The following works fine for me on CMake 2.8.0.

message("PATH = $ENV{PATH}")
find_library(FOO foo NO_SYSTEM_ENVIRONMENT_PATH)

If you place a foo.lib in your PATH CMake shouldn't find it with that
option.  NO_DEFAULT_PATH should work as well although it excludes all
of the default search paths not just the ones specified by the PATH
environment variable.

See:
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_library

-- 
Philip Lowman


More information about the CMake mailing list