Hi, Thank you so much for your reply. About archiving the libraries, can I use "ar" with "custom_command()" to archive the three libraries into one big library.?
Thank you in advance Mina ________________________________ From: Eric Noulard <[email protected]> To: mina adel <[email protected]> Cc: [email protected] Sent: Thu, February 3, 2011 2:12:26 AM Subject: Re: [CMake] a question about archiving libraries 2011/2/3 mina adel <[email protected]>: > > > Hi All > > In my code I use an available libraries (amd btf colamd) > > In order to compile those using cmake I use add_custom_command() to "cd" > into each folder and then run "make" for each library. You should have a look at: ExternalProject_Add from the ExternalProject CMake module. > Now each library will have a lib file compiled, for example "Lib/libamd.a " > > Now, I want to take all the made libraries from the three folders (amd btf > colamd), and make one big library (libsparse.a). > > How I can do this using cmake? You don't, at least not 'out of the box' with CMake. If you know how to do that by "hand" then you can craft a custom commande to do it. You are looking for something like "Convenience library" which are not supported by CMake: http://www.cmake.org/Wiki/CMake_FAQ#Does_CMake_support_.22convenience.22_libraries.3F Now if your 3 libs (amd btf colamd) are "just" a set of file to compile then may be creating a add_library CMake rule which is the collation of all sources in there may be a solution. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
