Closed Drllap closed 4 months ago
Hi @Drllap
Thanks for your question.
Whatever a package build scripts have is completely internal to the package. It doesn't even matter if a package is built with CMake, Meson, Autotools or other build system.
What defines what information needs to be propagated to the consumers of a package is the package_info()
method.
Please check:
I just pushed an example repo here: https://github.com/Drllap/conan-compile-definition-propagation-test
@memsharded Thanks Adding
def package_info(self):
self.cpp_info.libs = ["cpt"]
self.cpp_info.defines = ["SOME_COMPILE_DEFINITION"]
Works
What is your question?
I'm creating a conan package for a 3rd party library. This library has a preprocessor macro in the public headers. Then in the
CMakeList
it hasMy understanding is that because this compile definition is PUBLIC it should be propagated to the consumer of the conan package but it doesn't seem to be working for me. Is there something specific that I need to add to the conanfile.py?
Have you read the CONTRIBUTING guide?