conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
110 stars 359 forks source link

[bug] `self.dependencies[lib].cpp_info.resdirs` empty in test package #2767

Open SpaceIm opened 2 years ago

SpaceIm commented 2 years ago

Environment Details (include every applicable attribute)

Steps to reproduce (Include if Applicable)

In test_package:

    def generate(self):
        self.output.info(f"bindirs: {self.dependencies[<recipename>].cpp_info.bindirs}")
        self.output.info(f"includedirs: {self.dependencies[<recipename>].cpp_info.includedirs}")
        self.output.info(f"libdirs: {self.dependencies[<recipename>].cpp_info.libdirs}")
        self.output.info(f"resdirs: {self.dependencies[<recipename>].cpp_info.resdirs}")

run conan create

Logs (Executed commands with output) (Include/Attach if Applicable)

libjpeg/9e (test package): bindirs: ['C:\\Users\\spaceim\\.conan\\data\\libjpeg\\9e\\_\\_\\package\\e9a552ebe8f994398de9ceee972f0ad207df0658\\bin']
libjpeg/9e (test package): includedirs: ['C:\\Users\\spaceim\\.conan\\data\\libjpeg\\9e\\_\\_\\package\\e9a552ebe8f994398de9ceee972f0ad207df0658\\include']
libjpeg/9e (test package): libdirs: ['C:\\Users\\spaceim\\.conan\\data\\libjpeg\\9e\\_\\_\\package\\e9a552ebe8f994398de9ceee972f0ad207df0658\\lib']
libjpeg/9e (test package): resdirs: []

(In libjpeg recipe, there is a cmake_layout, and resdirs is not modified in package_info(), see https://github.com/conan-io/conan-center-index/pull/13123/commits/30e4ab1c0a00a2f03d98ddc137d7dda7cfb54c56)

SpaceIm commented 2 years ago

Actually it seems that layout() set resdirs to empty

/cc @uilianries @SSE4 @prince-chrismc for documentation in CCI

memsharded commented 2 years ago

Yes, it is true, layout() changes the defaults, as resdirs was not been used very much, we decided that the default should be empty.

Moving this issue to docs.

uilianries commented 2 years ago

Good to know, so we don't need to update it in recipes.