Skip to content

antoniovazquezblanco/cmake-pcfilegenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

CMake PC file generator

This modules allows for automatic PC file generation for your targets. That is untill CMake supports the feature (https://gitlab.kitware.com/cmake/cmake/-/issues/22621).

Installation

This repo is meant to be cloned as a submoule inside your project CMake modules folder. Alternatively, you can copy the cmake module directly in your folder.

Remember to add your CMake modules folder to the module search path in your CMakeLists.txt. This can be done with the list append command:

list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/<your_cmake_modules_folder>/cmake-pcfilegenerator")

Also, include the module in your CMakeLists.txt:

include(PcFileGenerator)

Usage

After you have included the module, the following variables will be available:

  • CMAKE_INSTALL_PKGCONFIGDIR: The default value will be ${CMAKE_INSTALL_LIBDIR}/pkgconfig.

The module also exposes the following functions:

  • target_pc_file_generate: Generate a ".pc" file for the provided target.

About

Automatically generate PC files for your CMake targets.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages