[CMake] [Cmake] Retrieve all runtime dependencies
Hi, Is there any way in CMake to get a list of all binaries related to one target? What I mean is that assuming I have a target, say a library lib_a, that depends on lib_b and lib_c which are either SHARED or MODULE (so they produce a .dll/.so), is there a way or macro to get a string with the paths of each binary output: .../.../.../lib_a.dll .../.../.../lib_b.dll .../.../.../lib_c.dll on windows, assuming I only provide the target name libi_a? My first thinking was that as CMake produce project files that have all these information, then it should be possible to get this list in some way. However I'm a bit lost on where to find the necessary information, in a generic way. Also, I think the build mode should be provided to any function or macro that would provide such a list. It would be extremely useful (to me) to get such a list, to apply some target's post-build scripts to these binaries. The simpler alternative is to have such list hand-written outside of CMake scripts, making the information located at more than one locations. Joel Lamotte / Klaim -- 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
Re: [CMake] [Cmake] Retrieve all runtime dependencies
On Mon, Sep 3, 2012 at 11:05 AM, Klaim - Joël Lamotte mjkl...@gmail.com wrote: Hi, Is there any way in CMake to get a list of all binaries related to one target? What I mean is that assuming I have a target, say a library lib_a, that depends on lib_b and lib_c which are either SHARED or MODULE (so they produce a .dll/.so), is there a way or macro to get a string with the paths of each binary output: .../.../.../lib_a.dll .../.../.../lib_b.dll .../.../.../lib_c.dll on windows, assuming I only provide the target name libi_a? My first thinking was that as CMake produce project files that have all these information, then it should be possible to get this list in some way. However I'm a bit lost on where to find the necessary information, in a generic way. Also, I think the build mode should be provided to any function or macro that would provide such a list. It would be extremely useful (to me) to get such a list, to apply some target's post-build scripts to these binaries. The simpler alternative is to have such list hand-written outside of CMake scripts, making the information located at more than one locations. take a look at the GetPrerequisites cmake module. -- John M. Drescher -- 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
Re: [CMake] [Cmake] Retrieve all runtime dependencies
On Mon, Sep 3, 2012 at 6:45 PM, John Drescher dresche...@gmail.com wrote: take a look at the GetPrerequisites cmake module. Thanks, I didn't know about this. Joel Lamotte -- 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