conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.17k stars 974 forks source link

[feature] PkgConfigDeps `pkg_config_name` property as empty #17049

Open franramirez688 opened 1 week ago

franramirez688 commented 1 week ago

What is your suggestion?

It'd be useful to have the mechanism to avoid the creation of any PC file. For instance:

    def package_info(self):
        self.cpp_info.set_property("pkg_config_name", "")

Have you read the CONTRIBUTING guide?

AbrilRBS commented 6 days ago

Suggestion: Is there prior art to have something be disabled by passing an empty string? (Outside the CLI options like -tf) I ask to know if we have thought about instead of "", if passing None would be better/feasible

franramirez688 commented 6 days ago

The problem that I see with the None value is when you read that property from the Conan side it'll be difficult (but not impossible for sure) to distinguish between the property was set to None or was not declared.

memsharded commented 6 days ago

We have the set_property("cmake_find_mode", "none") to disable the generation of CMakeDeps xxx-config.cmake files.