If you want to write reg values with cmake, you can execute cmake as a sub-process with -E command line args (for example, using EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} .... in your CMakeLists.txt file)<br><br>Use the write_regv -E sub-command:<br>
<br>cmake -E<br>CMake Error: cmake version 2.6-patch 0<br>Usage: cmake -E [command] [arguments ...]<br>Available commands:<br> chdir dir cmd [args]... - run command in a given directory<br> copy file destination - copy file to destination (either file or directory)<br>
copy_if_different in-file out-file - copy file if input has changed<br> copy_directory source destination - copy directory 'source' content to directory 'destination'<br> compare_files file1 file2 - check if file1 is same as file2<br>
echo [string]... - displays arguments as text<br> echo_append [string]... - displays arguments as text but no new line<br> environment - display the current enviroment<br> make_directory dir - create a directory<br>
md5sum file1 [...] - compute md5sum of files<br> remove_directory dir - remove a directory and its contents<br> remove [-f] file1 file2 ... - remove the file(s), use -f to force it<br> tar [cxt][vfz] file.tar file/dir1 file/dir2 ... - create a tar archive<br>
time command [args] ... - run command and return elapsed time<br> touch file - touch a file.<br> touch_nocreate file - touch a file but do not create it.<br> write_regv key value - write registry value<br>
delete_regv key - delete registry value<br> comspec - on windows 9x use this for RunCommand<br><br><br><br><br><div class="gmail_quote">On Fri, May 23, 2008 at 12:07 PM, KSpam <<a href="mailto:keesling_spam@cox.net">keesling_spam@cox.net</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Arjen,<br>
<div class="Ih2E3d"><br>
On Thursday 22 May 2008 23:35:33 Arjen Markus wrote:<br>
> Having CMake set the necessary registry entries would not help with<br>
> binary distributions of your product. I do not whether that is relevant<br>
> to you, but in general that would be a problem:<br>
> - Your clients may have the libraries installed in a different place<br>
> - They may have different versions<br>
> - They may lack the permissions to install libraries<br>
<br>
</div>My concern is not for binary distributions. For binary distributions, I<br>
create a NSIS installer that automatically sets PATH (we put all of our dlls<br>
in a single directory for distributions).<br>
<br>
I am trying to make PATH easier to deal with for developers. Our project<br>
keeps all dependency third party libraries in a single external directory.<br>
Developers will sometimes work with different versions of a library. For<br>
instance, some developers will build with QT-4.3.3, and others will build<br>
with QT-4.4.0. This is easy to handle on the build side with CMake. The<br>
problem I run into is that two different versions of QT require different<br>
dlls, and I have to ensure that the path is set properly to find the correct<br>
version of the QT dlls. I know exactly what the PATH needs to be from my<br>
CMake configuration variables. I simply want to be able to apply that<br>
knowledge to set PATH automatically for users.<br>
<br>
Using the add-in mentioned in my previous post would allow me to do this:<br>
<div class="Ih2E3d"><br>
<a href="http://workspacewhiz.com/OtherAddins.html#SolutionBuildEnvironment" target="_blank">http://workspacewhiz.com/OtherAddins.html#SolutionBuildEnvironment</a><br>
<a href="http://www.workspacewhiz.com/SolutionBuildEnvironmentReadme.html" target="_blank">http://www.workspacewhiz.com/SolutionBuildEnvironmentReadme.html</a><br>
<br>
</div>In order to use the add in, I would need to generate a simple<br>
(one-line) .slnenv file for each .sln file generated. I was enquiring as to<br>
the best way to add generation support for creating the .slnenv files. I am<br>
guessing that I would actually have to modify the Visual Studio generator.,<br>
but I am hoping for a less-intrusive solution.<br>
<br>
Another possible solution would be to write out environment variables to the<br>
registry from CMake; however, it seems that writing to the registry is not<br>
currently possible.<br>
<div><div></div><div class="Wj3C7c"><br>
Thanks,<br>
Justin<br>
_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>