【问题标题】:How do I specify library and its include in meson cross file如何在介子交叉文件中指定库及其包含
【发布时间】:2021-06-03 01:08:00
【问题描述】:

我正在尝试为 arm 交叉编译和构建 gst-rtsp-server

我已经运行 meson build 但它总是返回

Found CMake: NO
Run-time dependency glib-2.0 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency glib-2.0

meson.build:136:0: ERROR: Neither a subproject directory nor a glib.wrap file was found

.但是我已经在介子交叉文件中填写了位置

[properties]
c_args = ['-I/opt/linaro/aarch64-linux-gnu/include/c++/7.5.0',
          '/home/monki/gstream/include/glib-2.0']
cpp_args = ['-I/opt/linaro/aarch64-linux-gnu/include/c++/7.5.0',
        '/home/monki/gstream/include/glib-2.0']
objc_args = []
objcpp_args = []
c_link_args = ['-L/opt/linaro/aarch64-linux-gnu/lib64',
               '-L/home/monki/gstream/lib']
cpp_link_args = ['-L/opt/linaro/aarch64-linux-gnu/lib64',
         '-L/home/monki/gstream/lib']

我做错了什么?

问候 谢谢

【问题讨论】:

    标签: c cross-compiling meson-build


    【解决方案1】:

    Meson 将使用 pkg-config 和 cmake 来寻找 glib,它并不关心你有 -L 和 -I 选项,而是添加

    [built-in options]
    pkg_config_path = ['/home/monki/gstream/lib/pkg-config', ...]
    

    到您的交叉文件。这指示 Meson 在使用 pkg-config 时搜索这些路径以查找主机系统依赖项

    (根据您拥有的介子版本,您可能需要使用[properties] 部分而不是[built-in options] 部分。)

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-28
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-18
    相关资源
    最近更新 更多