colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

colcon-cmake prevents building non-cmake packages #121

Closed christianrauch closed 1 year ago

christianrauch commented 2 years ago

colcon-cmake globally expects a CMakeLists.txt. This prevents building with other build systems, e.g. meson.

To reproduce, install colcon-meson and create a workspace with a meson package:

pip install colcon-common-extensions
pip install colcon-meson
mkdir -p ~/cam_ws/src
cd ~/cam_ws/src
git clone https://git.libcamera.org/libcamera/libcamera.git
cd ~/cam_ws
colcon build

This will fail with:

CMake Error: The source directory "[workspace]/src/libcamera" does not appear to contain CMakeLists.txt.
cottsay commented 1 year ago

I'm unable to reproduce this using the steps you laid out. The package build proceeds using colcon-meson as expected.

Dockerfile:

```Dockerfile FROM ubuntu:focal RUN apt update && DEBIAN_FRONTEND=noninteractive apt install \ cmake \ git \ libgnutls28-dev \ meson \ python3-jinja2 \ python3-pip \ python3-ply \ -y RUN python3 -m pip install colcon-common-extensions && python3 -m pip install colcon-meson RUN mkdir -p cam_ws/src && git clone https://git.libcamera.org/libcamera/libcamera.git cam_ws/src/libcamera WORKDIR cam_ws RUN colcon build ```
christianrauch commented 1 year ago

I cannot reproduce this anymore. Not sure now what changed in between.

I will close this for now.