Be careful with your use of $ENV{PROGRAMFILES} - it might not give you what you expect on a 64-bit computer. Since the CMake binary is by default 32-bit, you need some logic to make sure you're looking where you think you're looking.<br>
<br>See also:<br><a href="http://public.kitware.com/Bug/view.php?id=9992">http://public.kitware.com/Bug/view.php?id=9992</a> - related CMake bug with patch: contains some cmake script code to figure out what program files env var is appropriate to search given the *build type* (32-bit or 64-bit) regardless of the bit mode of the CMake executable itself.<br>
<a href="http://en.wikipedia.org/wiki/Environment_variable#System_path_variables">http://en.wikipedia.org/wiki/Environment_variable#System_path_variables</a> - explanation of the numerous ProgramFiles variables on a 64-bit system.<br>
<br>Ryan<br><br><div class="gmail_quote">On Wed, Jul 14, 2010 at 11:08 AM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2010/7/14 John Drescher <<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>>:<br>
<div class="im">> On Wed, Jul 14, 2010 at 11:15 AM, Verweij, Arjen <<a href="mailto:VerweijA@tass-safe.com">VerweijA@tass-safe.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>>><br>
>>>You seem to have a path using \ instead of /<br>
>>><br>
>><br>
>> Isn't that to be expected of a PATH setting on a Windows computer?<br>
>> Anyway, the path to the Visual Studio compiler is of the same format and cmake deals with it just fine.<br>
>><br>
><br>
> I use / for all paths inside my CMakeLists.txt files even on windows<br>
> computers. If I am grabbing paths from the environment I use a string<br>
> replace in the CMakeLists.txt<br>
><br>
> string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})<br>
<br>
</div>file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" PGM_FILES)<br>
<br>
should work as well.<br>
<br>
see the file command for details.<br>
<div class="im"><br>
<br>
--<br>
Erk<br>
Membre de l'April - « promouvoir et défendre le logiciel libre » -<br>
<a href="http://www.april.org" target="_blank">http://www.april.org</a><br>
_______________________________________________<br>
</div><div><div></div><div class="h5">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>
</div></div></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>