[CMake] Creating a common (= across several projects) CMake module/include-file/library

Alexander Dahl post at lespocky.de
Thu Jun 27 11:54:14 EDT 2013


Hei hei, 

On Mon, May 13, 2013 at 06:17:58PM -0400, Matthew Woehlke wrote:
> Another option to consider is keeping the file in an external
> repository and using your VCS's external-repo support to bring it
> into your other projects. This way the file exists in your source
> tree, but your VCS is tracking it against a central repository,
> rather than each project's repo having independent copies. (This
> will also probably make getting the file into your source packages
> easier.)

We do this with git submodules and adding the path of this
subdirectory to the cmake paths like you described. Works pretty well.

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured, 
the first thought forbidden, the first freedom denied, chains us all 
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130627/ae16bddf/attachment.pgp>


More information about the CMake mailing list