meson-build

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

佐手、 提交于 2019-12-06 16:04:58
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 MyLib2.lib . What is the correct way to do so? OK, I found solution on MesonBuild: How to define

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

此生再无相见时 提交于 2019-12-05 03:08:53
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? As documented here and here The main use case for this [ declare_dependency() ] is in subprojects. and [ dependency() ]

Flatpak Meson Not Finding Vala Libraries From Gnome Builder

随声附和 提交于 2019-12-01 06:59:26
From Linux, I'm using Meson (0.44.0) within Gnome Builder (3.26.4) for a console program that will use Gee and GXml. My intent is to write this in Genie. When I use Meson within Gnome Builder it fails but the same succeeds when invoked from the command line using valac (0.38.8) as follows: valac --pkg=gtk+-3.0 --pkg=gee-0.8 --pkg=gxml-0.16 main.gs There is no error from the above. I've tried setting up meson.build with gee and gxml as dependency and alternatively as vala_args . Same error. Checking pkg-config, I get the following: $ pkg-config --libs gxml-0.16 -L/usr/local/lib64 -lgxml-0.16

Flatpak Meson Not Finding Vala Libraries From Gnome Builder

元气小坏坏 提交于 2019-12-01 05:24:04
问题 From Linux, I'm using Meson (0.44.0) within Gnome Builder (3.26.4) for a console program that will use Gee and GXml. My intent is to write this in Genie. When I use Meson within Gnome Builder it fails but the same succeeds when invoked from the command line using valac (0.38.8) as follows: valac --pkg=gtk+-3.0 --pkg=gee-0.8 --pkg=gxml-0.16 main.gs There is no error from the above. I've tried setting up meson.build with gee and gxml as dependency and alternatively as vala_args . Same error.

'cmake rebuild_cache' for *just* a subdirectory?

寵の児 提交于 2019-11-29 04:23:51
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 directory using: make mylib If I modify the CMakeLists.txt file in the sub-directory (which I've been