mesonbuild / mesonbuild/meson

OpenCV cmake submodule

Open
#12,554 0 comments 0 reactions 1 assignee View on GitHub

@mensinda is already working on this.

Since Nov 26, 2023.

module:cmake
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

**Describe the bug**
Impossible to build opencv as cmake submodule.

**To Reproduce**
```
mkdir test
cd test
git init
git submodule add https://github.com/opencv/opencv.git subprojects/opencv
nano meson.build
```
Content of `meson.build`:
```
project('test', 'cpp')
cmake = import('cmake')
opencv_proj = cmake.subproject('opencv')
opencv_dep = opencv_proj.dependency('opencv4')
```
`meson setup build` returns ([see meson.log for full logs](https://github.com/mesonbuild/meson/files/13467982/meson.log)):
```
subprojects/opencv/meson.build:258:0: ERROR: File /home/maxime/test/build/subprojects/opencv/__CMake_build/modules/core/opencl_kernels_core.hpp does not exist.
```

**Expected behavior**
No error, as with cmake and ninja:
```
mkdir subprojects/opencv/build_cmake && cd subprojects/opencv/build_cmake
cmake ../ -GNinja
ninja
```

**system parameters**
* plain native build
* Fedora 38
* Python 3.11.6
* Meson 1.3.0
* Ninja 1.11.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.