<div dir="ltr"><div>Thank you, Nils.<br><br></div>Tom<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 11:25 AM, Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 09.09.2014 17:02, Tom Kacvinsky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have not been able to find this in the cmake documentation. I have a collection of source that needs to be compiled via the cmake build system, plus a collection of object files that were compiled outside the cmake build system.  I want to combine the two of these to make a shared library, but apparently add_library only takes a list of source files.  Is there a way of getting cmake to build a shared library with the collection of source and object files I have?  I know I could make an archive of the object files and use that library in target_link_libraries, but I would like to avoid this if I can.<br>
<br>
</blockquote>
<br></span>
You should be able to list your object files like regular source files.<br>
If they have known object file extensions they should be detected as such (.obj, .o, .lo).<br>
Otherwise you can try setting the EXTERNAL_OBJECT[1] source file property for them.<br>
<br>
Nils<br>
<br>
[1] <a href="http://www.cmake.org/cmake/help/v3.0/prop_sf/EXTERNAL_OBJECT.html" target="_blank">www.cmake.org/cmake/help/v3.0/<u></u>prop_sf/EXTERNAL_OBJECT.html</a><br>
</blockquote></div><br></div>