Skip to content

Add files for installing the library #1

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

Closed
wants to merge 4 commits into from

Conversation

Murmele
Copy link
Contributor

@Murmele Murmele commented Jan 4, 2023

No description provided.

@Murmele Murmele marked this pull request as ready for review January 4, 2023 22:54
@Murmele
Copy link
Contributor Author

Murmele commented Jan 5, 2023

@LinuxDevon

Copy link
Owner

@LinuxDevon LinuxDevon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't gotten around to package and installing yet. Thanks for this one!

A few quick questions since I haven't used much cpack. I ran this branch to see the output with make package this creates the zip files and an install script. What all needs to be included with this packaging? I see the dbc.pc and install_manifest.txt also in the folder. just wanting to know what to include and/or what to run when creating a release. I will do some more digging later but was curious if you knew or not.

@Murmele
Copy link
Contributor Author

Murmele commented Jan 6, 2023

As what I know anything else is needed for distributing the library. I created an Arch Linux package: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=dbc_parser_cpp-git
So basically the dbc.pc file is a helper file for cmake which describes the project and all the paths to the library, include paths and other dependencies.

In a cmake project you just simply search for the dbc package. Cmake searches then through a few search paths to find the dbc.pc file and creates from it then a target.
This target can then linked to the library. In the dbc target also the include directories which are needed are included. So you don't have to add them explicitly. Pretty simple ^^ (I also just learned it a few days ago)

FIND_PACKAGE(PkgConfig REQUIRED)
pkg_check_modules(dbc REQUIRED IMPORTED_TARGET dbc)
target_link_libraries(yourApplicationTarget PkgConfig::dbc)

…0) [0|204] "Km/h" DEVICE1,DEVICE2,DEVICE3

- multiple whitespaces at the end:  SG_ TEMPERATURE : 48|16@1+ (0.01,-40) [-40|125] "C"  DEVICE1,DEVICE2,DEVICE3
@Murmele Murmele closed this Jan 6, 2023
@Murmele
Copy link
Contributor Author

Murmele commented Jan 6, 2023

I closed this in favor of #5
I just used here the master, but this was not good

@LinuxDevon
Copy link
Owner

Alright I will take a look at the new PR. Thanks for the info above! That seems pretty straight forward. Nice to see the AUR also! Been meaning to getting around and learning that. Maybe I will see about adding this to some of the main line distros. Never done something like that before. This would be a great project to learn that on.

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

Successfully merging this pull request may close these issues.

2 participants