Replies: 2 comments
-
Let me rephrase my question: Given a specific build target (it could be an executable or a shared_library), I need to copy to a specific place (the "install" dir) the executable or the shared_library itself, along with all its dependent shared libraries, that could be from dependent build targets, or from dependencies (conan packages in my case). How could I do that? My first idea was to use Another idea would be to use an extenal script that consumes the introspection files, but there is no info there about what are the dependencies for a given target. |
Beta Was this translation helpful? Give feedback.
-
Not sure you've found a solution to your problem, but we had a similar goal. I found that I can break up each project (be it a library, executable, bundle of scripts, etc) into subprojects, and then put some logic into the top level meson.build file to select what to build, and then use it'd be nice if there were an inverse of |
Beta Was this translation helpful? Give feedback.
-
We are trying to migrate to meson a monorepo with several build targets. I'm trying to figure out the best way to manage the install process.
Suppose I have two apps: exeA and exeB. Each app have several dependencies. Suppose exeA and exeB both depend on a shared library libC. exeA could also depend on pluginD, which is another shared library, but not a build dependency.
I want to create an installation for each app. For instance, put in a given directory exeA, will all its dependencies, config files, plugins, etc. ; and put in another directory exeB, with all its dependencies, etc. In our context, exeA may be released at a different time than exeB, and therefore they could use a different version of libC. We are on a Windows environment, and the shared libraries are installed beside their exe, and not on a central place on the os.
I was thinking about using tag for that: for each target, I could tag the related installation target. However, I cannot put more than one tag on a target, therefore it could not manage shared library that need to be installed for two different intall targets. Furthermore, it would be cumbersome to manually tag each shared library to belong to a given install target, when it is already a build dependency for the given build target.
I could use a custom install script, but then how could I inform that script what file belong to what target, without duplicating the information that is already in the meson.build files?
To summarize, I want to know how could I tell meson to install a given part of my monorepo, that would trigger the build of the needed targets and copy the relevant files, knowing that some files can belong to more than one install target?
Beta Was this translation helpful? Give feedback.
All reactions