meson-build

How can I specify library path when using Meson?

流过昼夜 提交于 2021-02-07 06:16:25
问题 I'm trying to build a c++ project with Meson. The thing is, I have some libraries under /opt/conda but can't figure out how to link the project when running meson build . It seems to be only searching through /usr/lib directory. As far as I understood, meson uses cmake and pkg-config to look for libraries. Then would setting something like CMAKE_PREFIX_PATH be a feasible solution? and if so, how can I do that? Thanks in advance. 回答1: I see two possible approaches to solve your problem. the

How to install sshfs without sudo?

吃可爱长大的小学妹 提交于 2021-01-29 08:18:44
问题 I'm trying to build sshfs on a cluster where I don't have root access. Following these instructions I did: 1) Built and installed ninja and meson 2) Built libfuse with meson --prefix=/cluster/home/user/fuse The problem comes when trying to install libfuse ( ninja install ), which requires root credentials. I get the following error: Running custom install script '/cluster/home/user/fuse/libfuse/util/install_helper.sh /cluster/home/user/fuse/etc /cluster/home/user/fuse/bin /usr/lib/udev/rules

How to run meson build system on windows?

最后都变了- 提交于 2021-01-21 09:58:25
问题 I would like to use meson build system on windows. I am python noob. It looks like I installed it, but I do not know how to run it. I have installed python 3.6. I have installed meson from 'cmd': C:\>python -m pip install meson Collecting meson Downloading meson-0.39.0.tar.gz (558kB) 100% |████████████████████████████████| 563kB 866kB/s Installing collected packages: meson Running setup.py install for meson ... done Successfully installed meson-0.39.0 I try to run meson: C:\>python -m meson C

How to get the include directories from a dependency in meson build system

风格不统一 提交于 2020-05-13 19:28:53
问题 In meson build system, I want to get the include directories from a dependency: Simple example meson.build, using wxWidgets dependecy as example: project('project1', ['cpp']) wxdep = dependency('wxWidgets') wxincludes = # ... how to get the include directories from wxdep ? # in this case, wxincludes will be used to compile a resource file: windows = import('windows') windows.compile_resources('test.rc', include_directories: [wxincludes]) How can I get the include directories from a dependency

How do you suppress the console window on Windows?

ⅰ亾dé卋堺 提交于 2020-02-02 10:11:04
问题 Take the basic example Gtk+ app and calll it main.vala : using Gtk; int main (string[] args) { Gtk.init (ref args); var window = new Window (); window.title = "First GTK+ Program"; window.border_width = 10; window.window_position = WindowPosition.CENTER; window.set_default_size (350, 70); window.destroy.connect (Gtk.main_quit); var button = new Button.with_label ("Click me!"); button.clicked.connect (() => { button.label = "Thank you"; }); window.add (button); window.show_all (); Gtk.main ();

Meson working with data/assets and portable/relative paths

柔情痞子 提交于 2020-01-03 03:32:10
问题 I'd like to use Meson to build a little game in C++. Let's say that theses are my file: . ├── img │ └── img.png ├── meson.buid └── src ├── main.cpp └── meson.build Here are the meson.buid files: # meson.build project('mygame', 'cpp') subdir('src') pkgdatadir = join_paths(get_option('datadir'), 'mygame') install_subdir('img', install_dir : join_paths([pkgdatadir, 'img'])) And the second file: # src/meson.build executable('mygame', 'main.cpp', install : true) In my C++ code, what path should I

Meson targets that depend on subdir siblings

时光总嘲笑我的痴心妄想 提交于 2019-12-24 16:53:18
问题 Here is my project structure: . ├── include ├── src │ ├── abc │ │ ├── include │ │ └── src │ ├── def │ │ ├── include │ │ └── src │ └── ghi │ ├── include │ └── src └── vendor ├── bar │ ├── include │ └── src └── foo 16 directories I would like to port my build to Meson. However, I'm not sure how to link targets defined in sibling folders. My dependency graph looks like this: src/abc/meson.build defines a static library abc src/def/meson.build defines a static library def that depends on abc and

'cmake rebuild_cache' for *just* a subdirectory?

前提是你 提交于 2019-12-18 04:17:14
问题 I have an issue with the generation of makefiles stage of CMake being slow which is similar to this unanswered question: CMake is slow to generate makefiles My project is made up of a top level CMakeLists.txt file which uses add_subdirectory() to add various subprojects for individual library and executable components. For a given component, the CMakeLists.txt file contains something like: add_library(mylib SHARED sourceFile1.cpp sourceFile2.cpp ... ) I can build just the contents of that

Link Against Existing `.lib` File in Meson Build on Windows

☆樱花仙子☆ 提交于 2019-12-08 07:51:57
问题 I'm building a simple project in Meson Build. While it is well documented how to create a dependency in Meson Build Documentation (With implicit assumption of UNIX / LINUX system) it is not clear how to link against arbitrary not on path library. Let's I have the following project on Windows: - ProjectFolder - SrcFiles - SrcFile1.c - SrcFile2.c - Lib - MyLib1.lib - MyLib2.lib I want to create an executable based on SrcFile1.c and SrcFile2.c which is linked against pre built MyLib1.lib and

MesonBuild: How to define dependency to a library that cannot be found by `pkg-config`?

做~自己de王妃 提交于 2019-12-07 00:51:43
问题 My project (in C) has a third party dependency at build time. But the third party library is, by default, installed to /opt/ instead of /lib , and I cannot find it in pkg-config . From mesonbuild 's documentation, should I use declare_dependency , I don't have its source code to treat it as my sub-project. If I use dependency() to define it, I can't find the correct argument to define a customized location. How to declare dependency for a non-standard third party library? 回答1: As documented