[CMake] What am I doing wrong with FIND_PATH???

Andreas Pakulat apaku at gmx.de
Fri Jan 20 08:49:09 EST 2012


On 20.01.12 08:31:52, Dick Munroe wrote:
> I'm executing the following:
> 
>   FIND_PATH(ESPLANNER_INSTALL_PATH
>     "C:/Program Files/ESPlanner"
>     "E:/Program Files/ESPlanner"
>   )
> 
> Looking for the directory in which this package is installed.
> 
> Looking at the two disks, C: and E:, I can see the following directory:
> 
> E:/Program Files/ESPlanner
> 
> From my readings, ESPLANNER_INSTALL_PATH should contain E:/Program
> Files/ESPlanner (or one of the various windoze representations of
> that path) after FIND_PATH is executed.  Instead I get:
> 
> ESPLANNER_INSTALL_PATH-NOTFOUND
> 
> So I'm a little puzzled as to what I should be doing.

Re-Read the cmake manual about the find_path function. Your invocation
is missing the file that is supposed to be searched in the path.

> p.s. CMake 2.8.2
> 
> p.p.s. Having CMake keep a list of mounted disks/volumes around that
> could be used to search for various directories would be a handy
> feature.

There are various cmake and envvars you can set to include paths that
you want to be searched by find_*-commands. Again check the manual for
the exact names.

Andreas



More information about the CMake mailing list