pkg-config and CMake

pkg-config and CMake

If the library that you want to use is not coming with Find<package>. cmake you can use pkg-config files which are stored in “.pc”. The environmental variable PKG_CONFIG_PATH is the place that should point to the “.pc” files.

Type in the shell:

To get the list of all available package configs, you can type:

How to set an environmental variable in CMake file:

Now how to print environmental variables in CMake file:

Flann

To get the libs and version, type in shell :

After setting environmental variable PKG_CONFIG_PATH pointing to your .pc file, you can call:

gRPC

gRPC as another example:

TinyXML2

 

Google Benchmark

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x