I believe this works if you just make your binary directory at CMake time a sibling of your source directory.<div><br></div><div>Ryan<br><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 11:19 AM, Andrea Galeazzi <span dir="ltr"><<a href="mailto:Galeazzi@korg.it">Galeazzi@korg.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Suppose you have a project with a lot of sub-projects like:<br>
add_subdirectory("path1/lib1" "${CMAKE_CURRENT_BINARY_DIR}/lib1")<br>
add_subdirectory("path2/lib2" "${CMAKE_CURRENT_BINARY_DIR}/lib2")<br>
.............<br>
When I choose VS as target CMake generates a solution made up of each sub-project with all files. Unfortunately that's not possible with eclipse because a project must be,at least, a sibling of source directory in order to browse the source files.<br>
So I wrote a simple program that generates an eclipse project by parsing each add_subdirectory statement in a sibling directory named dir_postfix.<br>
For instance, add_subdirectory("path1/lib1" "${CMAKE_CURRENT_BINARY_DIR}/lib1") generates an eclipse project in the directory path1/lib1_eclipse_debug.<br>
After that I import all generated project into my workspace.<br>
My question is: don't you think this could be an useful "native" feature that should improve the eclipse/cmake interaction?<br>
Did anyone ever have such need?<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>
</div>