2011/7/26 Julien Dardenne <julien.darde...@technooliq.com>: > Hi, > > I have a path and i try to extract the folder name of this one. > > example : > > For C:/Programs/game/test, i would get test > > Do you know a cmake command ? or should i use regular expressions ? > If so, can you give me an example ?
set(ORIGNAME "C:/Programs/game/test") get_filename_component(FNAME ${ORIGNAME} NAME) You should get what you want in variable FNAME. and.... you should read the doc of "get_filename_component" cmake builtin macro: cmake --help-command get_filename_component -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake