Thanks a lot Eric<br><br>Actually I am trying to move a project already done to CMake, and it doesn't have any executable in the top directory, it is now done in Windows under Visual Studio. <br><br>In the top directory I have a CMakeLists,txt that calls each one of the subdirectories in which I have also their respective CMakeLIsts.txt.<br>
<br>But I don't know at the end how to put everything together in an executable. Because each directory compiles independently, like a module. I don't know how it is done in Visual Studio.<br><br>Thanks again<br><br>
Enrique<br><br><div class="gmail_quote">On Wed, Feb 2, 2011 at 3:42 PM, 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;">
2011/2/2 Enrique Izaguirre <<a href="mailto:enrique.izaguirre@gmail.com">enrique.izaguirre@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hello,<br>
><br>
> Is it possible to create an executable in your top directory if you don't<br>
> have there any program? I mean, if all your programs .c and .cpp are in<br>
> subdirectories contained in your top directory, each one with its own<br>
> CMakeLists.txt.<br>
> I have three subdirectories, and all my programs are in these<br>
> subdirectories. I don't have any in my main directory, but the executable<br>
> should be created in the main directoy. Is it possible? How?<br>
<br>
</div></div>Yes you can.<br>
<br>
You can control the output directory for executable/library using<br>
EXECUTABLE_OUTPUT_PATH<br>
and/or<br>
LIBRARY_OUTPUT_PATH<br>
see;<br>
<a href="http://www.cmake.org/Wiki/CMake_Useful_Variables" target="_blank">http://www.cmake.org/Wiki/CMake_Useful_Variables</a><br>
<br>