New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jsoncpp: fix generated pkg-config file #92307
Conversation
--- /nix/store/1krp64nddlrz0lv3nmfj0c7dlphl9lng-jsoncpp-1.9.2/lib/cmake/jsoncpp/jsoncppConfig.cmake
+++ /nix/store/37mfb95lf2nc3pvbkl4zj49d11wzs8ls-jsoncpp-1.9.2/lib/cmake/jsoncpp/jsoncppConfig.cmake
@@ -42,14 +42,14 @@
# The installation prefix configured by this project.
-set(_IMPORT_PREFIX "/nix/store/1krp64nddlrz0lv3nmfj0c7dlphl9lng-jsoncpp-1.9.2")
+set(_IMPORT_PREFIX "/nix/store/37mfb95lf2nc3pvbkl4zj49d11wzs8ls-jsoncpp-1.9.2")
# Create imported target jsoncpp_lib
add_library(jsoncpp_lib SHARED IMPORTED)
set_target_properties(jsoncpp_lib PROPERTIES
INTERFACE_COMPILE_FEATURES "cxx_std_11;cxx_auto_type;cxx_decltype;cxx_default_function_template_args;cxx_defaulted_functions;cxx_delegating_constructors;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_lambdas;cxx_long_long_type;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_right_angle_brackets;cxx_rvalue_references;cxx_static_assert;cxx_strong_enums;cxx_trailing_return_types;cxx_uniform_initialization;cxx_variadic_macros;cxx_variadic_templates"
- INTERFACE_INCLUDE_DIRECTORIES "/nix/store/1krp64nddlrz0lv3nmfj0c7dlphl9lng-jsoncpp-1.9.2/include"
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
# Load information for each installed configuration. Where are you seeing the error? Now there is actually an issue with the |
Yeah, the problem is in the pkgconfig file. I mistakenly assumed it was using the CMake config file. I submitted a PR: open-source-parsers/jsoncpp#1199. It looks like they support meson now, but I think at least ethminer depends on jsoncpp's CMake config files. |
I added the patch to this PR. |
5a25c2c
to
8635977
Compare
Thanks. |
Motivation for this change
Using jsoncpp's imported CMake targets currently results in the following error:
This happens because jsoncpp uses the
install(EXPORT ...)
CMake function, which does not work with absolute paths in theCMAKE_INSTALL_INCLUDEDIR
variable. This PR makes the package use a relative path forCMAKE_INSTALL_INCLUDEDIR
, which is fine in this case because this package does not use split outputs.cc @ttuegel @cpages @nand0p
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)