Open dengelt opened 11 months ago
We would need support for pkgconfig in hip first before it could be implemented in miopen. Also, any generation of pkgconfig files needs to be done by rocm-cmake to ensure consistency across components.
@dengelt Internal ticket is created for this enhancement request. Thanks!
Issue Summary:
I would like to request the addition of pkg-config support in the project build system. Currently, the project relies on CMake for its build configuration, but having a pkg-config file would greatly enhance interoperability with other build systems and ease the integration process for downstream projects.
Description:
As an end-user, integrating projects into different build environments can sometimes be challenging. While CMake is a powerful and widely used build system, having a pkg-config file alongside it would facilitate seamless integration for developers using other build systems, such as Autotools or Meson or making FFI bindings to other languages such as Rust.
Benefits of Adding pkg-config Support:
Interoperability: Developers using build systems other than CMake can easily incorporate the project into their workflows without additional manual configuration.
Dependency Management: pkg-config simplifies the process of managing dependencies by providing a standardized way to query and retrieve information about installed libraries.
Ease of Integration: Projects using pkg-config can be more easily integrated into various development environments, making it more accessible for a broader audience.
Suggested Implementation:
Create a
*.pc.in
file that contains the necessary variables and information about the project.Configure the file during the build process using CMake variables to ensure dynamic values like installation paths are correctly handled.
Install the generated
*.pc
file alongside other artifacts during the installation phase.Example
CMakeLists.txt
Changes:Here's another example: https://www.scivision.dev/cmake-generate-pkg-config/
Additional Notes:
Please consider versioning the pkg-config file according to the project's version to avoid conflicts with multiple installed versions.
Ensure that the necessary variables in the
*.pc.in
file (e.g.,Libs
,Cflags
) accurately reflect the project's configuration.Thank you for considering this enhancement request. I believe that adding pkg-config support will contribute to the project's usability and ease of adoption across various development environments.