[CMake] CMAKE_MODULE_PATH Question

Alexander Neundorf a.neundorf-work at gmx.net
Wed Apr 15 16:17:59 EDT 2009


On Saturday 11 April 2009, Robert Dailey wrote:
> The latter does not work for me. I don't know what to tell you.
>
> On Sat, Apr 11, 2009 at 6:43 AM, Daniel Nelson <torham at connect2.com> wrote:
> > On Thursday 09 April 2009 11:58:55 am Robert Dailey wrote:
> > > Sorry, the missing $ was a typo. The problem was that I was doing:
> > > include( foo.cmake )
> > >
> > > I should have been doing:
> > >
> > > include( foo )
> > >
> > > Sorry for the mixup :)
> > >
> > > Thanks for the help guys! This was a silly screwup on my part :P
> >
> > Should actually work either way:
> > include(foo)

This means you skipped the file extension, so it is more a "logical" name, and 
cmake will search in the standard locations for foo.cmake, including 
CMAKE_PREFIX_PATH.

> > include(foo.cmake)

This means you specified a full filename, so cmake will try to load 
${CMAKE_CURRENT_SOURCE_DIR}/foo.cmake

Alex


More information about the CMake mailing list