-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dependency() should have an option to override globally defined paths #10910
Comments
Why can't you just use the global path for this? If you have multiple versions of a dependency installed to different install paths, then I would assume those dependencies are isolated on their own. Adding that path to the global path will only affect one dependency anyway. |
If I have the same library version installed once in debug build and once in release build, how do I configure to use either one? I can only set the global path, which has the side effect of influencing other dependencies then.
…On October 9, 2022 7:31:55 PM GMT+02:00, Eli Schwartz ***@***.***> wrote:
Why can't you just use the global path for this? If you have multiple versions of a dependency installed to different install paths, then I would assume those dependencies are isolated on their own. Adding that path to the global path will only affect one dependency anyway.
--
Reply to this email directly or view it on GitHub:
#10910 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
How does it influence other dependencies? |
Because the global path influences where they are found, in case of multiple versions. |
Shouldn't you just be adding one version of the original dependency to your cmake path? It's not really clear to me what you're trying to do here. |
Let me try again:
CMake has the |
And how do you toggle between these without editing CMakeLists.txt? Wouldn't it make more sense to have:
Since prefixDebug/ is not intended to be a general environment for finding multiple software components, it seems odd to store multiple software components in it. |
Anyway: https://mesonbuild.com/Dependencies.html#cmake You can set cmake_module_path inside the |
I need to set the prefix path, not the module path. |
I might be misunderstanding something completely, but here goes.
Describe the bug
dependency()
cannot be told to look for a dependency in a specific prefix.To Reproduce
Assume you have multiple versions of a library installed in different installation prefixes. During development you might want to switch between them (e.g. debug and release builds). But you can only set
cmake_prefix_path
and the like globally, there is no way I can see to override this path for a single dependency. Thedefault_options
argument todependency()
cannot be used to overridecmake_prefix_path
.Expected behavior
An option to modify the environment for the execution of the function should be available. The doc sounds like
default_options
should be for this purpose, but it seems I am misunderstanding itsystem parameters
The text was updated successfully, but these errors were encountered: