[CMake] how to start cmake-gui from context menu in windows? (cmake-gui arguments)

livia.barazzetti at istb.unibe.ch livia.barazzetti at istb.unibe.ch
Mon May 19 04:57:57 EDT 2014


Dear all,

I would like to add a shortcut in the context menu in windows 7 for txt files, so that I have an option to start cmake with the selected "CMakeLists.txt"  as input.
I know how to add an extension modifying the registry ( go to HKEY_CLASSES_ROOT\txtfile\shell  , create a new key (for example "Run CMake", add a sub-key "command " and set the value "default" with the program to launch).
I tried to run "C:\\Program Files (x86)\\CMake 2.8\\bin\\cmake-gui.exe" %1 , but cmake is launched showing the last build.
Anyway, this shortcut works correctly in a build directory (if I run it from a CMakeCache.txt it opens Cmake-gui with the cached values).

I can't find a command line option to start it in the desired source folder. I actually found an option list for cmake-gui http://linux.die.net/man/1/cmake-gui , but it seems they don't work . In this thread I haven't found an option for setting the source directory either http://www.cmake.org/pipermail/cmake/2013-November/056293.html .
In brief , my question is: is there any command line option for starting cmake with a custom source?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140519/aff4d8f2/attachment-0001.html>


More information about the CMake mailing list