Compilation error when adding restclient-cpp on yocto build

I want to add restclient-cpp to the Linux 2.7b4 (morty branch) image to be used with Colibri iMX6.

I create a recipe using recipetool. The recipe generated is as follows:

LIC_FILES_CHKSUM = "file://LICENSE;md5=875d6e9ec1cb59099f4d9da1e81d1e91 \
                    file://vendor/gtest-1.7.0/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \

SRC_URI = "gitsm://;protocol=https"

# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "affecbf5d6ae64218f1fdab571c3805a1e1071cf"

S = "${WORKDIR}/git"

# NOTE: unable to map the following CMake package dependencies: jsoncpp GTest
DEPENDS = "curl"

inherit cmake

# Specify any options you want to pass to cmake using EXTRA_OECMAKE:

When I run bitbake restclient-cpp I get the following error

| CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
|   CMake 3.10.0 or higher is required.  You are running version 3.6.1
| -- Configuring incomplete, errors occurred!

but when I inherit autotools along with cmake in the recipe, I get following error

| ERROR: oe_runmake failed
| fatal: Not a git repository (or any of the parent directories): .git
| m4 -I m4 -DM4_RESTCLIENT_VERSION= version.h.m4 > include/restclient-cpp/version.h
| /bin/sh: include/restclient-cpp/version.h: No such file or directory
| Makefile:1096: recipe for target 'include/restclient-cpp/version.h' failed
| make: *** [include/restclient-cpp/version.h] Error 1
| make: *** Waiting for unfinished jobs....
| ERROR: Function failed: do_compile

This is the file that gets generated when we do a make install for the git package.

Is there any way to get restclient-cpp installed without upgrading cmake to 3.10.0 ?


You may use a previous version of this restclient-cpp which does not depend on a later cmake version.

Alternatively, why don’t you try M$ cpprest?