conan-io / conan-vs-extension

Conan Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
MIT License
59 stars 34 forks source link

Changes to conanfile.py #231

Closed gitandeee closed 1 month ago

gitandeee commented 1 month ago

Hi,

some libraries require modifications to the conanfile.py, e.g. the imgui library needs sometimes to copy additional files (see example: https://github.com/conan-io/examples2/blob/main/examples/libraries/imgui/introduction/conanfile.py).

Is there currently a way to introduce these modifications into the conanfile.py with this extension without overwriting or breaking?

Thank you in advance!

czoido commented 1 month ago

Hi @gitandeee,

Thanks a lot for the question. Yes, there's a way, please check that when you add libraries a conanfile.py is automatically generated, with a comment on the beginning of the file. Just remove the comment that will mark the file as modified so it will not be overwritten and add the additional logic you need to it. The plugin will keep working as long as you don't modify the requirements logic that adds them from the self.conan_data attribute

Hope this helps!

gitandeee commented 1 month ago

Thank you, it was indeed that simple :)