I'm using to building code with CMake; but I'm now faced with using meson to build a certain repository. With CMake
and make
, if I use something like:
cmake -DCMAKE_INSTALL_PREFIX=/some/where` build_dir
make -C build_dir
make -C build_dir install
then instead of the files going under /usr/local
by default, they will go under /some/where
, eg /some/where/bin
for executables, /some/where/lib
, for libraries etc.
What's the meson equivalent of doing this?
Inspired by:
What is CMake equivalent of 'configure --prefix=DIR && make all install '?
It's actually similar to the autotools convention in terms of the switch:
meson setup --prefix=/path/of/installation/destination build_dir
ninja -C build_dir
ninja -C build_dir install
(you could drop the first ninja command; ninja install
will build before it installs.)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.