Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684280 - dev-cpp/nlohmann_json should provide cmake config files
Summary: dev-cpp/nlohmann_json should provide cmake config files
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-24 16:18 UTC by Nicolas Werner
Modified: 2019-06-28 23:26 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Werner 2019-04-24 16:18:51 UTC
Current versions of nlohmann_json are built with meson instead of the upstream default CMake. Because of this, the ebuild doesn't install the following files:

/usr/lib64/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
/usr/lib64/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
/usr/lib64/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake

Because of this packages using the system nlohmann_json and building via CMake, that are using the recommended way to integrate nlohmann_json into a CMake project, fail to build, because they can't find it. To work around this issue requires patching every ebuild to use pkgconfig to find it, which is not really practical.

The proper solution would be in my opinion to build nlohmann_json via CMake and not via meson as, as far as I can tell, the meson build files are only supplied for easier integration with meson packages when used via mesons wrap system. I don't know however, if meson packages or other build systems can still find it, if it is installed via CMake, as I don't know, if CMake also provides a *.pc file. Meson probably should work, as it does have compatibility with CMake find_package files.
Comment 1 Larry the Git Cow gentoo-dev 2019-06-28 23:26:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0682016ae2e1edbdfa11c73ce44cd0f981a91a0e

commit 0682016ae2e1edbdfa11c73ce44cd0f981a91a0e
Author:     Tim Harder <radhermit@gentoo.org>
AuthorDate: 2019-06-28 23:21:41 +0000
Commit:     Tim Harder <radhermit@gentoo.org>
CommitDate: 2019-06-28 23:24:48 +0000

    dev-cpp/nlohmann_json: install non-amalgamated headers
    
    Also, use cmake for building instead of meson.
    
    Closes: https://bugs.gentoo.org/684280
    
    Signed-off-by: Tim Harder <radhermit@gentoo.org>

 .../nlohmann_json/nlohmann_json-3.6.1-r1.ebuild    | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)