pkg-config and CMake

The environmental variable:
PKG_CONFIG_PATH is the place that you should place all of your “.pc” files.

Example:
Type in the shell:

Then you can type:

Now how to print environmental variable in CMake file:

How to set environmental variable in CMake file:

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

 

Leave a Reply

avatar
  Subscribe  
Notify of