Rinat Veliakhmedov
Rinat Veliakhmedov

Reputation: 1039

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?

Upvotes: 4

Views: 2960

Answers (1)

uilianries
uilianries

Reputation: 3887

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

Upvotes: 8

Related Questions