[CMake] Unable to fetch directory name from path

2009-02-05 Thread Ashutosh Juneja
Hi, I am unable to fetch only directory name from an absolute path in CMakeList.txt file. GET_FILENAME_COMPONENT(c:/path/to/dir dirname NAME) does no produce any output. 1. Is it only for files or not directories? or am I doing any mistake? 2. Is it possible to split a path in an list/array? (

Re: [CMake] Unable to fetch directory name from path

2009-02-05 Thread David Cole
cmake --help-command GET_FILENAME_COMPONENT You have the variable name and the input reversed. Try this: GET_FILENAME_COMPONENT(dirname c:/path/to/dir NAME) On Thu, Feb 5, 2009 at 12:38 PM, Ashutosh Juneja ashutosh.jun...@gmail.comwrote: Hi, I am unable to fetch only directory name from an

Re: [CMake] Unable to fetch directory name from path

2009-02-05 Thread Alexander Neundorf
On Thursday 05 February 2009, Ashutosh Juneja wrote: Hi, I am unable to fetch only directory name from an absolute path in CMakeList.txt file. GET_FILENAME_COMPONENT(c:/path/to/dir dirname NAME) does no produce any output. First the variable, then the path: GET_FILENAME_COMPONENT(dirname