<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi,<br>Thank you so much for your reply.<br><br>About archiving the libraries, can I use "ar" with "custom_command()" to archive the three libraries into one big library.?<br><br>Thank you in advance<br>Mina <br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Eric Noulard <eric.noulard@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> mina adel <elecengineer_mina@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> cmake@cmake.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, February 3, 2011 2:12:26 AM<br><b><span style="font-weight:
bold;">Subject:</span></b> Re: [CMake] a question about archiving libraries<br></font><br>2011/2/3 mina adel <<a ymailto="mailto:elecengineer_mina@yahoo.com" href="mailto:elecengineer_mina@yahoo.com">elecengineer_mina@yahoo.com</a>>:<br>><br>><br>> Hi All<br>><br>> In my code I use an available libraries (amd btf colamd)<br>><br>> In order to compile those using cmake I use add_custom_command() to "cd"<br>> into each folder and then run "make" for each library.<br><br>You should have a look at:<br>ExternalProject_Add from the ExternalProject CMake module.<br><br>> Now each library will have a lib file compiled, for example "Lib/libamd.a "<br>><br>> Now, I want to take all the made libraries from the three folders (amd btf<br>> colamd), and make one big library (libsparse.a).<br>><br>> How I can do this using cmake?<br><br>You don't, at least not 'out of the box' with CMake.<br>If you know how to do that by
"hand" then you can craft a custom<br>commande to do it.<br><br>You are looking for something like "Convenience library" which are not<br>supported by CMake:<br><a href="http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F</a><br><br>Now if your 3 libs (amd btf colamd) are "just" a set of file to compile<br>then may be creating a add_library CMake rule which is the collation<br>of all sources<br>in there may be a solution.<br><br><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></div></div>
</div><br></body></html>