You can use configure_file to create the .vcproj.user files that
contain the debug-time environment variables (including path) - but
that doesn't solve the build-time issue. You might copy the dll to the
build directory in a PRE_BUILD custom command.<br><font color="#888888">
<br>Ryan</font><br><br><div class="gmail_quote">On Wed, Feb 10, 2010 at 6:20 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div><div></div><div class="h5">On Wed, Feb 10, 2010 at 7:16 PM, Alan W. Irwin <span dir="ltr"><<a href="mailto:irwin@beluga.phys.uvic.ca" target="_blank">irwin@beluga.phys.uvic.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On 2010-02-10 23:41+0100 Gabriel Petrovay wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
We are using CMake 2.6. For Windows we need the DLL's of the required<br>
libraries for two reasons given below.<br>
<br>
Take for example LibXml.dll which is required by our project in order to run<br>
on Windows. One can build and link our project successfully because the<br>
FindLibXml2.cmake provides:<br>
# LIBXML2_INCLUDE_DIR - The LibXml2 include directory<br>
# LIBXML2_LIBRARIES - The libraries needed to use LibXml2<br>
<br>
But we also need a reference to the LibXml2.dll file for the following 2<br>
reasons.<br>
<br>
1. When you "make" the "install" target (e.g. "nmake install"), the dll of<br>
the required library has to go into the "bin" directory, as well where our<br>
executable.<br>
2. We also need to set the PATH environment variable in order to execute our<br>
own executable (during the build, a bootstrap executable). So we need it in<br>
a scenario like:<br>
SET(ENV{PATH} ${LIBXML2_DLL})<br>
</blockquote>
<br></div>
Would setting that environment variable from cmake affect subsequent Windows<br>
builds? I don't have any Windows development experience, but this question<br>
just came up on the PLplot list. There, we all speculated from our various<br>
Linux and Windows platform perspectives that SET(ENV{PATH} ...) just sets<br>
the PATH when you are running cmake and would have no effect on the<br>
environment for the subsequent build. Thus, we thought you would have to<br>
externally set the PATH before running the build. But we all could be wrong<br>
which is why I have asked this question. :-)<br>
<br></blockquote><div><br></div></div></div><div>Alan,</div><div><br></div><div>You are correct. Doing this...</div><div><br></div><div>SET(ENV{xxx} "value")</div><div><br></div><div>...in a CMakeLists.txt file only sets an environment variable for the duration of the cmake run. It has no influence on downstream build steps.</div>
<div><br></div><div>HTH,</div><div>David</div><div><br></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br><br clear="all"><br>-- <br>Ryan Pavlik<br>HCI Graduate Student<br>Virtual Reality Applications Center<br>
Iowa State University<br><br><a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a><br><a href="http://academic.cleardefinition.com">http://academic.cleardefinition.com</a><br>Internal VRAC/HCI Site: <a href="http://tinyurl.com/rpavlik">http://tinyurl.com/rpavlik</a><br>