[CMake] How to automate building of third party library using cmake

Vivek Goel goelvivek2011 at gmail.com
Mon Jul 30 15:16:19 EDT 2012


What I am looking for:

   - Download library
   - Extract It
   - Apply custom patch
   - Run configure
   - Run build command

What library I am trying to build  are:

   - Openssl
   - Boost
   - Thrift
   - C-ares
   - Curl
   - Pcre
   - Nginx
   - ICU
   - JsonCPP


I think I can do these things using external module:
http://cmake.org/cmake/help/v2.8.8/cmake.html#module:ExternalProject

But I have following question?

   1. I have different type of build and with different directory. Is it
   going to build all these library for every different target? If yes it will
   be painful as all these library take one hour to build. Is there a way I
   can control it and it only build it once. As library remains same for all
   these targets.
   2. On switching directory to different name. Cmake force everything to
   be rebuild-ed. Will it be same for external library. If yes? How to solve
   this problem. I don't want to rebuild the library if I am not changing them
   and want to use them while switching to different branches without building
   them.



regards
Vivek Goel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120731/43e57757/attachment.htm>


More information about the CMake mailing list