Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#811430: libjsoncpp-dev: Install jsoncppConfig.cmake to dev package.

51 views
Skip to first unread message

Ghislain Antony Vaillant

unread,
Jan 18, 2016, 4:00:04 PM1/18/16
to
Package: libjsoncpp-dev
Version: 0.10.5-1
Severity: normal

Dear Maintainer,

Upon reading the upstream sources, it seems that jsoncpp provides and installs
a cmake config file alongside the pkg-config file. Please consider installing
jsoncppConfig.cmake as part of the dev package under the following path:

/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/cmake/jsoncpp.

That way, jsoncpp can now be discovered in CMake via find_package.

Best regards,
Ghis


-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (500, 'testing'), (2, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libjsoncpp-dev depends on:
ii libjsoncpp0v5 0.10.5-1

libjsoncpp-dev recommends no packages.

libjsoncpp-dev suggests no packages.

-- no debconf information

Peter Spiess-Knafl

unread,
Jan 18, 2016, 6:30:03 PM1/18/16
to
Hi Ghis!

Thank you for this suggestion. I will check about common practices, how
other packages solve this. I am not sure if what you suggest is policy
compliant.

Anyway I think it is a very good idea.

Greetings
Peter

Ghislain Vaillant

unread,
Jan 19, 2016, 5:00:03 AM1/19/16
to
Hi Peter, thanks for acknowledging the bug.

Feel free to have a look here for a working example:


https://anonscm.debian.org/cgit/debian-science/packages/clblas.git/tree/debian

I have also provided an autopkgtest for building the examples to
verify that the find modules was installed appropriately. You may
also want to check clfft, arrayfire... or any other cmake based
package that I personally maintain if you don't trust my advice.

FYI, I believe the pkgconfig file should also end-up in a multi-arch
path (usr/lib/<multiarch-triplet>/pkgconfig) since it depends on a
multi-arch enabled variable (libdir). I am happy to file a different
bug for it if you want.

Thanks for your work on maintaining jsoncpp.

Cheers,
Ghis

Peter Spiess-Knafl

unread,
Jan 22, 2016, 3:20:04 PM1/22/16
to
Hi Ghis!

I just looked at the upstream source (current and newest one). I
couldn't find any FindModule for JsonCpp. Do you have a reference to it?

On 01/19/2016 10:51 AM, Ghislain Vaillant wrote:
> Hi Peter, thanks for acknowledging the bug.
>
> Feel free to have a look here for a working example:
>
>
> https://anonscm.debian.org/cgit/debian-science/packages/clblas.git/tree/debian
>
>
> I have also provided an autopkgtest for building the examples to
> verify that the find modules was installed appropriately. You may
> also want to check clfft, arrayfire... or any other cmake based
> package that I personally maintain if you don't trust my advice.
>
> FYI, I believe the pkgconfig file should also end-up in a multi-arch
> path (usr/lib/<multiarch-triplet>/pkgconfig) since it depends on a
> multi-arch enabled variable (libdir). I am happy to file a different
> bug for it if you want.

This is a different bug yes. Thank your for recognizing it.

Greetings
Peter

Ghislain Vaillant

unread,
Jan 22, 2016, 3:30:04 PM1/22/16
to
There is no need for one if the "jsoncppConfig.cmake" file is installed
in the appropriate CMake package directory. See the CMake reference [1]
for "config" mode.

[1] https://cmake.org/cmake/help/v3.0/command/find_package.html

Judging by the content of the root CMakeLists.txt, you will have to
enable the JSONCPP_WITH_CMAKE_PACKAGE option for it to be generated and
installed:

IF(JSONCPP_WITH_CMAKE_PACKAGE)
INSTALL(EXPORT jsoncpp
DESTINATION ${PACKAGE_INSTALL_DIR}/jsoncpp
FILE jsoncppConfig.cmake)
ENDIF()

Hope this helps.

Ghis
0 new messages