Skip to content

External Meson is Required for building on linux #1242

@StormLord07

Description

@StormLord07

Description

When building CPR version 1.12.0 on Linux (Ubuntu Server 22.04) and Windows, CMake errors out with the following message:

CMake Error at build/_deps/cpr-src/cmake/libpsl.cmake:7 (message):
  meson not found.  Please make sure you have meson installed on your system
  (https://mesonbuild.com/Getting-meson.html).  Meson is required for
  building libpsl for curl on Windows.
Call Stack (most recent call first):
  build/_deps/cpr-src/CMakeLists.txt:301 (include)

The Readme doesn't say that any external lib/app is required pre installing the cpr

Example/How to Reproduce

  1. git clone https://github.com/libcpr/example-cmake-fetch-content.git
  2. cd example-cmake-fetch-content
  3. Edit CMakeLists.txt and set CPR version to 1.12.0.
  4. cmake . -B build
  5. Observe the build fail with Meson-related error.

Possible Fix

Either:

Add meson as an explicitly documented dependency.

Or ensure libpsl is not built or required on Linux unless explicitly enabled.

Where did you get it from?

GitHub (branch e.g. master)

Additional Context/Your Environment

  • OS: Linux, Windows
  • Version: Ubuntu 24.04.2 LTS, Windows 10

cmake version 3.27.0
c++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions