如何使用单独的-dev头文件包为cmake创建Yocto食谱?

时间:2019-02-07 08:40:53

标签: cmake yocto

我正在尝试为内部库编写一个Yocto食谱,该内部库使用cmake进行构建和安装。从命令行运行make install,该库将安装以下文件(标题有所删节):

-- Installing: /prefix/lib/libreflection.so
-- Installing: /prefix/lib/libreflection.a
-- Installing: /prefix/include/reflect
-- Installing: /prefix/include/reflect/type.h
-- Installing: /prefix/include/reflect/detail
-- Installing: /prefix/include/reflect/detail/type.h
-- Installing: /prefix/include/reflect/detail/property.h
-- Installing: /prefix/include/reflect/detail/iterator
-- Installing: /prefix/include/reflect/detail/iterator/range.h
-- Installing: /prefix/include/reflect/detail/accessor.h
-- Installing: /prefix/include/reflect/property.h
-- Installing: /prefix/include/reflect/register.h
-- Installing: /prefix/include/reflect/object.h
-- Installing: /prefix/lib/cmake/libreflection/libreflection-config.cmake
-- Installing: /prefix/lib/cmake/libreflection/libreflection-config-noconfig.cmake

我想区分二进制“仅.so” Yocto软件包(libreflection)和开发版本,该版本另外包括静态库,标头和cmake软件包文件(libreflection-dev)。 / p>

我的初始配方如下,但是libreflectionlibreflection-dev都打包了所有文件:

DESCRIPTION = "C++ reflection library"
SECTION = "libs"
LICENSE = "CLOSED"

SRCREV = "${AUTOREV}"
SRCBRANCH = "master"
SRC_URI = "git://gitlab.company.com/group/${PN}.git;branch=${SRCBRANCH};protocol=ssh"

inherit cmake

S = "${WORKDIR}/git"

FILES_${PN}-dev += "${libdir}/cmake"

# The following are needed because the library is unversioned.
# See https://wiki.yoctoproject.org/wiki/TipsAndTricks/Packaging_Prebuilt_Libraries#Non-versioned_Libraries
SOLIBS = ".so"
FILES_SOLIBSDEV = ""

我尝试对FILES_${PN}*变量进行各种更改,但没有一个达到预期的效果。通常,我要么遇到打包错误,要么libreflectionlibreflection-dev都包含所有文件。

如何调整配方,使libreflection仅包含.so,而libreflection-dev包含所有文件?

0 个答案:

没有答案