I have to deal with a cross-platform application which needs an additional 3rd party library on Windows but not on Linux (and that library doesn't support Linux anyway). I have packed the library into a Conan package, supporting only `os=Windows complier="Visual Studio". Now if I put this library as
[requires]
Library/1.2.3@foo/bar
in my conanfile.txt
, conan install
will logically fail with the Error Missing prebuilt package
on Linux.
So is there a way to specify required packages conditionally in conanfile.txt
? Something like Library/1.2.3@foo/bar [os="Windows"]
. I read through the Conan docs but found nothing.
Or to tell conan install
ignore the error?
Or my only luck is to use two different conanfile.txt
on two platforms?
I can not use a conanfile.py
, since the build process is not managed by Conan, only the dependencies.