What should I do if the library doesn't use any build system? Should I add cmake/premake configuration to it along with the recipe? What is the preferred way? Is there any example I could learn from? How can I make the recipe work with all generators?
Hi @bugproof
I am not sure what you mean. Probably use the conan export-pkg command to package binaries?
Check https://docs.conan.io/en/latest/creating_packages/existing_binaries.html#packaging-pre-built-binaries
Is this what you are looking for?
Generators work independently of the build system used to build the package. As long as you fill the recipe package_info() method correctly, all different generators should work.
e.g. library has #ifdef STATIC but doesn't use cmake nor anything. Can I define it with conan so it will be included in generated cmake? or do I need to write my own cmake for it first and somehow put it alongside recipe?
yes, you want to do something like (in your package, that needs to be consumed with it:
def package_info(self):
# Information about this package for the consumers, will be put into generated files
self.cpp_info.defines = ["STATIC"]
Then you will see this definition in your generated files, adapted for every different generator syntax. Please try this and let me know if it works.