cmake: Pass installed include dir to mpgen #375

pull VijayabaskarR-06 wants to merge 1 commits into bitcoin-core:master from VijayabaskarR-06:fix-install-prefix changing 1 files +5 −1
  1. VijayabaskarR-06 commented at 9:05 AM on October 7, 2026: none

    Fixes #134.

    mpgen was looking for proxy.capnp using the path from when libmultiprocess was built. If the library was installed with a different prefix then the downstream builds failed with Import failed: /mp/proxy.capnp.

    This change passes the installed include path from Libmultiprocess::mpgen to mpgen so it can find the file after installation.

    Subdirectory builds and builds using MPGEN_EXECUTABLE are unchanged.

    I tested this with Bitcoin Core's bitcoin_ipc target. It works with this change and also compared it with main !

  2. cmake: Pass installed include dir to mpgen
    mpgen finds /mp/proxy.capnp using the CMAKE_INSTALL_PREFIX that was set
    when it was built. If libmultiprocess is installed somewhere else, for
    example with `cmake --install build --prefix ~/.local`, or the install is
    moved, code generation fails with "Import failed: /mp/proxy.capnp".
    
    When target_capnp_sources uses the imported Libmultiprocess::mpgen
    target, pass its include directory to mpgen as an import path. That path
    comes from the installed package location, so it is correct wherever
    the package ends up. Builds that use libmultiprocess as a subdirectory
    already pass MP_INCLUDE_DIR and are unchanged.
    
    Fixes #134
    7239a977c3
  3. DrahtBot commented at 9:05 AM on October 7, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-10-08 00:30 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me