Question re. CMAKE_BUILD_WITH_INSTALL_RPATH

I’m trying to build a product and am getting the following error

CMake Error at CMakeLists.txt:410 (add_executable):
[cmake] The install of the strawberry target requires changing an RPATH from the
[cmake] build tree, but this is not supported with the Ninja generator unless on an
[cmake] ELF-based or XCOFF-based platform. The CMAKE_BUILD_WITH_INSTALL_RPATH
[cmake] variable may be set to avoid this relinking step.

The Author pf the product doesn’t use Ninja, so he doesn’t know what the error means.
Thanks

I’m trying to build this on Ubuntu 24.04.2 LTS with cmake version 3.28.3

is not supported with the Ninja generator

The Author pf the product doesn’t use Ninja

So it means that you are using Ninja then, doesn’t it.

install of the strawberry target requires changing an RPATH from the build tree

CMAKE_BUILD_WITH_INSTALL_RPATH variable may be set

So have you tried following that instruction? Since it is printed out, one should probably not ignore it.

I have not set CMAKE_BUILD_WITH_INSTALL_RPATH as I don’t know what it should point to on Ubuntu 24.04.2 LTS

Have you tried looking for it in documentation?

Use the install path for the RPATH.

Normally CMake uses the build tree for the RPATH when building executables etc on systems that use RPATH. When the software is installed the executables etc are relinked by CMake to have the install RPATH. If this variable is set to true then the software is always built with the install path for the RPATH and does not need to be relinked when installed.

This is used to initialize the BUILD_WITH_INSTALL_RPATH target property for all targets.

If that doesn’t tell you enough, have you also tried following the link to the BUILD_WITH_INSTALL_RPATH property docs?