[cmake-developers] adding FindJsonCpp

Ben Boeckel ben.boeckel at kitware.com
Wed Jun 29 13:31:47 EDT 2016


On Wed, Jun 29, 2016 at 17:36:45 +0200, Farbos a wrote:
> I have a concern with generating package configs:
> 
> 1 It seems to contain absolute path, so not really portable with git.

The actual config files are generated at build time, not committed to
the source control (template files with @variable@ spots to insert
values are committed).

> 2 It does not respect the naming of imported targets with `::`. As you
> can see here: https://cmake.org/cmake/help/git-master/manual/cmake-developer.7.html#a-sample-find-module
> The fact that it produces an appropriate diagnostic messages if that
> target does not exist is really helpful.

Not sure exactly what you mean when the config file approach "does not
respect" imported target names, but the file that CMake generates is not
the direct config file, but is usually included (I have CMake generate
${pkg}-targets.cmake). Checking for targets in the top-level script is
certainly possible.

--Ben


More information about the cmake-developers mailing list