Hi,

2016-06-29 19:31 GMT+02:00 Ben Boeckel <ben.boec...@kitware.com>:
> 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).

I am not sure to understand what you are saying, did they do something
wrong or could we add some stuff in order to make in work with a
source control software. Just to be sure we are talking about these
lines: 
https://github.com/open-source-parsers/jsoncpp/blob/master/CMakeLists.txt#L144

>> 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.

When I look at the generated file here jsoncppConfig.cmake, you find
these lines:
```
# Create imported target jsoncpp_lib
add_library(jsoncpp_lib SHARED IMPORTED)

set_target_properties(jsoncpp_lib PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/home/hevy/jsoncpp/0.10.5/include"
)
...
```

The thing here is the library name is jsoncpp_lib and not something
like jsoncpp::jsoncpp_lib. And like I said earlier the name "::" is a
lot more helpful.

Thanks,

-- 
Arnaud FARBOS
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to