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

[Feature Request]: Support for PkgConfig #254

Open
amirmasoudabdol opened this issue Nov 1, 2021 · 0 comments
Open

[Feature Request]: Support for PkgConfig #254

amirmasoudabdol opened this issue Nov 1, 2021 · 0 comments

Comments

@amirmasoudabdol
Copy link

I'm wondering if there is a way to add support for pkg-config. This is in fact not a lot of work, and it can even be done manually after the installation but it is usually handled by the ./configure or make command. The format is very simple, and I already have a version that is working for me. The only thing that needs to be changed here is the prefix that can easily be set by the configurator.

prefix=/opt/homebrew/Cellar/readstat/1.1.7
libdir=${prefix}/lib
includedir=${prefix}/include

Name: readstat
Description: A command line tool (and C library) for converting SAS, Stata, and SPSS files
Version: 1.1.7
Libs: -L${libdir} -lreadstat
Cflags: -I${includedir}

This file usually sits in the lib/pkgconfig and it is named readstats.pc. If exists, most Unix-like systems can found it, and therefore link to it much easier. Even CMake can use this configuration, and simplifies the process of integrating the ReadStat to C/C++ projects.

❯ pkg-config --libs readstat
-L/opt/homebrew/Cellar/readstat/1.1.7/lib -lreadstat

❯ pkg-config --cflags readstat
-I/opt/homebrew/Cellar/readstat/1.1.7/include

I did not attempt to add this to your build system since I am aware that build system is a delicate thing, but if you point me to where you would like it to end up, I can try adding it, and make a PR for it.

@amirmasoudabdol amirmasoudabdol changed the title Support for PkgConfig [Feature Request]: Support for PkgConfig Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants