[CMake] retreiving the libraries the maven way?

Nicolas Herbaut n.herbaut at progexia.net
Mon Jan 14 03:17:40 EST 2013


Hello,

I started working on a new c++ project comming back after 4+ years of 
java coding.

For java, I use nexus, which is a binary repository server, that 
provides an nice REST API that allows clients to download dependencies 
by providing the library name and a target version.

I'm wondering if it would be feasible and difficult to port this logic 
into a cmake plugin, and allowing the find_library to seamlessly 
retreive the library from the system OR from a nexus server.

currently all our dependencies are stored in the svn, which slows down 
our builds and is not very flexible.

Let me be more specific by describing my usecase.

1- On a Windows PC, I need the zlib dll and the standard C dll to build 
my project
2- I issue a find_library command specifying both custom library paths 
and a nexus server URL
3 - for the standard C library, cmake findsout that it's already located 
into the system
4 - for zlib, cmake performs a request to the server which acknowledge 
the availability of the dll
5 - cmake downloads the library in a cache folder and tells the 
generator to link to the library it downloaded
6 - if the library cannot be found on the system and on the binary 
server, cmake fails
7 - the same thing happen on a mac system, but this time both the C lib 
and zlib are on the path, hence binary server is not even queried for a lib.

Could you guys give me your insights for this project?




More information about the CMake mailing list