我正在尝试将特征库纳入我的应用程序的Flatpak构建中,但无法弄清楚如何正确执行。到目前为止,我仅使用 cmake-Ninja
作为 buildsystem
使用库,而且效果很好。由于EIGEN是仅标题库,我想它应该以某种方式与 Simple
buildSystem一起使用,但是我不知道如何从源指定 eigen
subforter文件必须安装到/include
文件夹。到目前为止,我在清单中尝试的是:
{
...
modules = [
...
{
"name": "eigen",
"buildsystem": "simple",
"build-commands": [ "install -d Eigen /include/Eigen" ] ,
"sources": [
{
"type": "archive",
"url": "https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip",
"sha512": "3b06da583037649ad42190bd018ddf40b85179ad0877ebd7c1ca7b8498a1453eed25919de27d3bb737754086e1513408e7de4a2110d51912f2e5503e1ab7d838"
}
]
},
...
}
但是没有任何文件复制到/include
子文件夹中,并且我的应用程序的cmake build随后当然也没有找到eigen。我在这里一定有一些非常简单的东西。
我已经尝试在网络上查找几个小时,但是我什至不确定哪些文档在这里对我有帮助。 flatpak-builder命令命令参考在此上下文中以及在 install -d hello.sh ... 作为 simple
buildsystem的构建命令;有些使用 npm
命令,这让我感到困惑 - 我尝试了 apt install ...
,但当然不可用 - 如果/哪个软件包管理器,是否有一些参考可以在哪个运行时间使用?
我了解在上述命令中,Flatpak Builder可能无法确定我要复制的 eigen
的路径(尽管输出中没有错误消息) - 但是我如何指定它是来自源文件夹的文件夹?
I'm trying to incorporate the eigen library into the flatpak build of my application, but can't figure out how to do it properly. So far, I've only used libraries using the cmake-ninja
as buildsystem
and that has worked quite well. Since eigen is a header only library, I suppose it should somehow work with the simple
buildsystem, but I can't figure out how to specify that the Eigen
subfolder from the source files has to be installed to the /include
folder. What I've tried so far in my manifest:
{
...
modules = [
...
{
"name": "eigen",
"buildsystem": "simple",
"build-commands": [ "install -d Eigen /include/Eigen" ] ,
"sources": [
{
"type": "archive",
"url": "https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.zip",
"sha512": "3b06da583037649ad42190bd018ddf40b85179ad0877ebd7c1ca7b8498a1453eed25919de27d3bb737754086e1513408e7de4a2110d51912f2e5503e1ab7d838"
}
]
},
...
}
But no files get copied into the /include
subfolder, and my application's CMake build subsequently then of course also doesn't find eigen. There must be something very simple I'm missing here.
I've tried looking this up on the web for some hours now, but I'm not even sure yet which documentation might help me here. The flatpak-builder command reference seems too brief on information to be useful in this context, and also in the flatpak documentation I didn't really find anything that fits my needs.
The tutorials I found only useinstall -D hello.sh ...
as build-command for the simple
buildsystem; some use npm
commands, which got me confused - I tried apt install...
, but of course apt isn't available - is there some reference if/which package managers are available in which runtime maybe?.
I understand that in my above command, flatpak builder probably cannot determine the path of the Eigen
that I want to copy (though there is no error message in the output) - but how do I specify that it's the folder from the sources folder?
发布评论
评论(1)
我猜我最初的问题很容易回答,因为我刚刚意识到eigen实际上支持Cmake。因此,更改我的模块:
使一切正常。
I guess my original question can be answered easily, since I just realized that eigen actually supports cmake. So changing my module to this:
makes everything work.