0

I'm building a package "foo" which uses meson with the intent that it be followed by ninja.

So, I meson setup build_dir; cd build_dir; ninja and this works fine.

Now, I want to install the package to /opt/foo. I've been told I should do this like so:

DESTDIR=/opt/foo ninja install

Now, this does trigger the installation, but it doesn't act like autotools' PREFIX or CMake's CMAKE_INSTALL_DIR. Rather, /opt/foo is substituted for the root directory, so that the actual installation is located under /opt/foo/usr/local (e.g. /opt/foo/usr/local/lib, /opt/foo/usr/local/share etc).

What am I doing wrong? How can I get ninja to actually install to opt/foo?

einpoklum
  • 102,731
  • 48
  • 279
  • 553
  • self-duping... to [this one](https://stackoverflow.com/questions/66823647/what-is-the-meson-equivalent-of-cmake-install-prefix). – einpoklum Mar 26 '21 at 20:25

0 Answers0