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 c:/path/to/dir NAME)

> 2. Is it possible to split a path in an list/array? ( like extract 'abc'
> and 'def' from /path/to/split/abc/and/def )

You can call GET_FILENAME_COMPONENT() multiple times, ot you could replace all 
the "/" in the string with ";" and then use separate_arguments()

Alex
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to