Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using conanfile.txt and conanfile.py in the same directory

I have a C++ library that I build using Conan. It has a conanfile.txt with some dependencies and options. I build it using conan install ... to build thirdparty libraries and create conan config, and then using cmake to build the library itself.

Now I want to make the library itself a conan package. I've added conanfile.py, but now I can't build the library the way I did before because conan will use conanfile.py and ignore conanfile.txt.

How should I approach to solving this problem?

like image 362
Rinat Veliakhmedov Avatar asked Jan 26 '23 08:01

Rinat Veliakhmedov


1 Answers

By default Conan prefers conanfile.py, but you can use any name that you want.

To use a specific file you need to pass the file name:

conan install ../conanfile.txt
like image 68
uilianries Avatar answered Jan 31 '23 19:01

uilianries