Closed Jeanmilost closed 12 hours ago
Hi @Jeanmilost
Thanks for your question.
The previous conanfile.txt
has been replaced in this one by conanfile.py
and conandata.yml
.
You can define your options in your conanfile.py
, mostly with the default_options
(https://docs.conan.io/2/reference/conanfile/attributes.html#default-options) you can define values for your dependencies such as {"zlib/*:shared": False}
for example. Note in Conan 2 it is necessary to define patterns like zlib/*:shared
, not just zlib:shared
.
Note thay you will need to remove the comment guard for the extension not to overwrite your local conanfile.py changes :)
@memsharded @AbrilRBS Thank you very much. This worked for me and resolved the issue.
Thanks for the feedback! Closing as solved then.
I'm converting several VS2019 project which used Conan to VS2022. To achieve that I installed the Conan2 package management, and the Conan VS extension.
With Conan 1 I needed to configure a text file which contained the libraries to install, alongside with several important options. Below is one of the files I was using:
Now with Conan 2 I could generate the same dependencies, from the VS extension:
When I start to compile, the below configuration file is also generated automatically from the VS extension:
However there is an issue: The
[options]
block of the first Conan configuration file is completely discarded. In my case, this cause my compilation to fail while libraw is compiled, because it tries to include jasper in the middle, and this result to the following errors:On a previous Conan VS extension version, I could at least add this
[options]
block manually in the configuration file, which allowed to compile the dependencies successfully. But with the latest version, the file is regenerated automatically, and all my options are removed, causing the build to fail.On the other hand, I searched the correct way to configure these options, but I couldn't find how to achieve that.
Here are the options I need to add:
Can you please either tell me how to configure these options, or add a way to achieve that?