CMAKE_INSTALL_PREFIX的介子等效项是什么? [英] What is the meson equivalent of CMAKE_INSTALL_PREFIX?
问题描述
我正在使用CMake构建代码;但是我现在面临着使用介子建立特定存储库的问题.如果我使用类似以下命令,则使用 CMake
和 make
:
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
然后默认情况下,文件将位于/some/where
下,而不是默认位于/usr/local
下的文件./some/where/bin
用于可执行文件,/some/where/lib
用于库等.
then instead of the files going under /usr/local
by default, they will go under /some/where
, e.g. /some/where/bin
for executables, /some/where/lib
, for libraries etc.
这样做的介子作用是什么?
What's the meson equivalent of doing this?
灵感来自于:
什么是CMake等同于'configure --prefix = DIR&&全部安装'?
推荐答案
就开关而言,它实际上类似于自动工具约定:
It's actually similar to the autotools convention in terms of the switch:
meson setup --prefix=/some/where build_dir
ninja -C build_dir
ninja -C build_dir install
(您可以删除第一个ninja命令; ninja install
将在安装前生成.)
(you could drop the first ninja command; ninja install
will build before it installs.)
这篇关于CMAKE_INSTALL_PREFIX的介子等效项是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!