-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Open
Labels
kind: bugstate: help neededthe issue needs help to proceedthe issue needs help to proceedstate: waiting for PR
Description
Description
Issue identified that meson build does not install nlohmann_json*.cmake files into /usr/share/cmake/nlohmann_json, so packages expecting these .cmake files are unable to build.
Ref: LibreELEC/LibreELEC.tv#7250
we have reverted back to cmake builds for the time being. ** Our package build system prefers meson over cmake
Reproduction steps
Complete a meson build
Expected vs. actual results
Use a cmake build
Minimal code example
Na
Error messages
Na
Compiler and operating system
LibreELEC :master / gcc 12.2
Library version
3.11.2
Validation
- The bug also occurs if the latest version from the
develop
branch is used.I can successfully compile and run the unit tests.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
kind: bugstate: help neededthe issue needs help to proceedthe issue needs help to proceedstate: waiting for PR
Projects
Milestone
Relationships
Development
Select code repository
Activity
nlohmann commentedon Dec 17, 2022
I am not an expert on Meson. PRs welcome!
eli-schwartz commentedon Dec 18, 2022
Is there a static cmake file that can be installed?
heitbaum commentedon Dec 18, 2022
Ok: having a more detailed look:
meson install_pkg
cmake install_pkg
eli-schwartz commentedon Dec 18, 2022
nlohmann_jsonTargets.cmake is most likely a very complicated file autogenerated from scratch by the cmake program itself. Its job is basically to do
add_library()
and create an imported target defining the right include directory. If it could be statically generated, then Meson could simply install it as a file. The other two cmake files can be processed by Meson -- one is a template inside the repository, the other is a template inside cmake's installation directory. See https://mesonbuild.com/CMake-module.html#cmake-configuration-filesheitbaum commentedon Dec 18, 2022
ls -l
total 16
-rw-r--r-- 1 docker docker 620 Dec 18 08:07 nlohmann_jsonConfig.cmake
-rw-r--r-- 1 docker docker 676 Dec 18 08:07 nlohmann_jsonConfigVersion.cmake
-rw-r--r-- 1 docker docker 4449 Dec 18 08:07 nlohmann_jsonTargets.cmake
the below is created from cmake/config.cmake.in / text replacement…
below is just a simple text version replacement from cmake/nlohmann_jsonConfigVersion.cmake.in
dcbaker commentedon Jan 19, 2025
This is a far more complicated set of CMake config files than Meson knows how to generate currently, and I'm not interested in adding support, or even really in reviewing it. It's sort of a well known problem that pkg-config has limited expressiveness and CMake targets are CMake specific, and theres work on going to develop something that is vendor neutral but more expressive called CPS. Given that both Meson and CMake are working to support CPS, I'm disinclined to spend time teaching Meson to output these more complex CMake configs
heitbaum commentedon Jan 20, 2025
With the #4452 fix both pvr.freebox and pvr.vuplus are building with nlohmann_json, (so the pkgconfig seems to be enough.)
-- Found nlohmann_json: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-13.0-devel/toolchain/x86_64-libreelec-linux-gnu/sysroot/usr/include