The MESON project that depends lack of dependencies
Have you ever encountered such a situation: an excellent project has no meson.build
file, and the defender will not accept your pull request (PR), or even accept it? Alternatively, your project needs to add a license document every time you build, but the defender refuses to do this?
Don't worry! You can solve this problem by adding a git patch to . subprojects/*.wrap
files. meson.build
configuration, using the main branch (wrap-git
) as shown below: master
./subprojects/ht.wrap
<code>[wrap-git] directory=ht url=https://github.com/benhoyt/ht revision=master depth=1</code>
File: meson subprojects download
meson.build
./subprojects/ht
<code># 创建一个空的 meson.build 文件 (如果需要,可以添加内容) touch ./subprojects/ht/meson.build </code>
Then, specify the patch file in file:
<code class="language-bash">mkdir -pv subprojects/{packagecache,packagefiles} git -C ./subprojects/ht add meson.build git -C ./subprojects/ht diff --cached > ./subprojects/packagefiles/ht-meson.patch</code>
ht.wrap
Finally, apply patch and compile the project:
<code class="language-bash">echo "diff_files = ht-meson.patch" >> ./subprojects/ht.wrap</code>
executable files will appear in the
directory as expected.<code class="language-bash">meson subprojects purge --confirm meson subprojects download CC=gcc meson setup ./build --wipe -D b_sanitize=none -D buildtype=release meson compile -C ./build</code>
Related resources:
./build
ninja 1.12.1
GNU EMACS 30
The above is the detailed content of Meson: Using a Git project without Meson.Build as dependence. For more information, please follow other related articles on the PHP Chinese website!