Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatpak #98

Open
bunglesss opened this issue Jun 16, 2020 · 4 comments
Open

Flatpak #98

bunglesss opened this issue Jun 16, 2020 · 4 comments

Comments

@bunglesss
Copy link

Hi,

I was hoping to use this in a project, it looks very good. I'm using Gnome Builder, which uses Flatpak to build and distribute projects.

I managed to work out how to use Boost, but I'm struggling with restc-cpp. I did this ...

    {
        "name": "restc-cpp",
    "buildsystem": "cmake",
        "sources": [
            {
                "type": "url",
                "url": "https://github.com/jgaa/restc-cpp.git"
            }
        ]
    },

Which seems to work. But then in the meson.build file, I think I need to tell my program to use what it's compiled within Flatpak. I'm trying this kind of thing ...

restc-cpp_inc = include_directories('??)
restc-cpp_lib = static_library(...)
restc-cpp_dep = declare_dependency(link_with : restc-cpp_lib,
include_directories : restc-cpp_inc)

The thing is, I don't think restc-cpp has a pkg-config file, which would make the above easier?

Any help with this would be great.

@jgaa
Copy link
Owner

jgaa commented Jun 21, 2020

I have no experience with gnome builder or flatpak, so 'm afraid I can't help you with that.

@bunglesss
Copy link
Author

Wondered if you might know about a pkg-config file being distributed with this. Not sure whether cmake uses that, but seemed like a big thing with autotools and maybe other build systems to make it easier to pull in libraries ...

@bunglesss
Copy link
Author

Hmm ... this looks promising ...

https://mesonbuild.com/Dependencies.html#cmake

@bunglesss
Copy link
Author

This kind of works for the Flatpak part ...

    {
        "name": "restc-cpp",
    "buildsystem": "cmake",
    "config-opts": [
	"-DRESTC_CPP_WITH_UNIT_TESTS=OFF"
	],
        "sources": [
            {
                "type": "git",
                "url": "https://github.com/jgaa/restc-cpp.git"
            }
        ]
    },

It blows up thought because it seems it's trying to download to further dependencies internally? Is there any way around that?

I can then seemingly do this in the Meson bit ...

cmake_dep = dependency('rest-cpp', method : 'cmake')

Very new to all this stuff, Cmake, Meson and Flatpak. I'll get to write some C++ eventually :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants