[CMake] CMAKE_CURRENT_SCRIPT_DIR?

2006-11-07 Thread Lloyd Hilaiel
Howdy all, Did some searching but couldn't find a means to determine the current directory in which the currently processed CMake file resides. This is interesting for cases where the INCLUDE directive includes a cmake file that wishes to include others relative to itself. Is there a means of

Re: [CMake] CMAKE_CURRENT_SCRIPT_DIR?

2006-11-07 Thread Michael G. Hansen
Hi, there is CMAKE_CURRENT_LIST_FILE which returns the path to the currently processed list-file and you can get the directory using GET_FILENAME_COMPONENT: GET_FILENAME_COMPONENT(path_of_current_script_dir ${CMAKE_CURRENT_LIST_FILE} PATH) Note that there will be no slash at the end of

RE: [CMake] CMAKE_CURRENT_SCRIPT_DIR?

2006-11-07 Thread Brian Little
Of Michael G. Hansen Sent: Tuesday, November 07, 2006 1:10 PM To: Lloyd Hilaiel Cc: cmake@cmake.org Subject: Re: [CMake] CMAKE_CURRENT_SCRIPT_DIR? Hi, there is CMAKE_CURRENT_LIST_FILE which returns the path to the currently processed list-file and you can get the directory using GET_FILENAME_COMPONENT