mesonbuild / meson

The Meson Build System
http://mesonbuild.com
Apache License 2.0
5.62k stars 1.63k forks source link

Question, is there anything similar CMAKE_PREFIX_PATH in meson? #7780

Open lygstate opened 4 years ago

lygstate commented 4 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Please include your meson.build files, preferably as a minimal toy example showing the issue. You may need to create simple source code files (don't include private/proprietary code).

Expected behavior A clear and concise description of what you expected to happen.

system parameters

orbea commented 4 years ago

https://mesonbuild.com/Commands.html

lygstate commented 4 years ago

https://mesonbuild.com/Commands.html

which one?

dcbaker commented 4 years ago

What exactly are you wanting to do? meson has --pkg-config-path and --build.pkg-config-path, which let you set additions paths for pkg-config to search in, it also has --cmake-prefix-path and --build.cmake-prefix-path which set the CMAKE_PREFIX_PATH env variable when using cmake as a dependency finder.

lygstate commented 4 years ago

What exactly are you wanting to do? meson has --pkg-config-path and --build.pkg-config-path, which let you set additions paths for pkg-config to search in, it also has --cmake-prefix-path and --build.cmake-prefix-path which set the CMAKE_PREFIX_PATH env variable when using cmake as a dependency finder.

We I am trying to fixes curses detection, when I detecting whe methd=system, I need to know a list of PREFIX path to relative to find the corresponding package. For some package, they comes without pkg-config, just bin/include/lib directory, I need to find them with custom method=system. And this need a CMAKE_PREFIX_PATH directory, that's what I am talking about, and In meson, CMAKE_PREFIX_PATH are transfered to cmake directly, meson didn't use of it

lygstate commented 4 years ago

These seems also related,

https://github.com/mesonbuild/meson/issues/7746 https://github.com/mesonbuild/meson/issues/7720

dcbaker commented 4 years ago

I think what you're looking for is the sys_root property in the cross/native file?

lygstate commented 4 years ago

On Sat, Sep 26, 2020 at 9:36 AM Dylan Baker notifications@github.com wrote:

I think what you're looking for is the sys_root property in the cross/native file? Your are right, when cross, sys_root need to be considered, but on Windows/MSVC, there is no sys_root. And we won't pass sys_root parameter to meson. And even with cross, we still need a list of sys_root , not a single sys_root

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

-- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo