Skip to content
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

meson does not search CMake user package registry #9418

Closed
gpanders opened this issue Oct 21, 2021 · 1 comment
Closed

meson does not search CMake user package registry #9418

gpanders opened this issue Oct 21, 2021 · 1 comment
Assignees
Labels
dependencies dependency:cmake Issues related to `dependency` with the `cmake` method

Comments

@gpanders
Copy link

Describe the bug
Users can install CMake packages into the user package registry ($HOME/.cmake/packages on Unix by default). CMake will check this directory for packages if a package isn't found on the system, but meson does not.

To Reproduce

The following works with plain CMake:

$ mkdir -p ~/.cmake/packages/Foo
$ echo "$HOME/cmake/foo" > ~/.cmake/packages/Foo/foo
$ mkdir -p ~/cmake/foo
$ touch ~/cmake/foo/FooConfig.cmake
$ mkdir -p ~/cmake/bar
$ cd ~/cmake/bar
$ cat >CMakeLists.txt <<EOF
project(bar)
find_package(Foo REQUIRED)
EOF
$ cd ~/cmake/bar
$ mkdir build
$ cd build
$ cmake ..

Now trying to use the Foo package from meson:

$ mkdir ~/meson/bar
$ cd ~/meson/bar
$ cat > meson.build <<EOF
project('bar', 'c')

foo = dependency('Foo')
EOF
$ meson build

meson cannot find Foo.

Expected behavior
meson searches the CMake user package registry for CMake packages.

system parameters

  • macOS Big Sur
  • Python 3.9.7
  • meson 0.59.2
@eli-schwartz eli-schwartz added the dependency:cmake Issues related to `dependency` with the `cmake` method label Oct 21, 2021
@mensinda
Copy link
Member

Should be fixed with #9424. However, only for the Linux registry. I am not sure if Meson should even attempt to read/touch the Windows registry in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies dependency:cmake Issues related to `dependency` with the `cmake` method
Projects
None yet
Development

No branches or pull requests

3 participants