Repository: conan-io/conan

Issue:
Conan >=1.3 breaks multi-package support
We use the N configs -> 1 package approach (still, we didn't manage to switch to a 1 config 1 package approach due to technical difficulties). So a typical package_info looks as follows:

```
def package_info(self):
        if self.settings.os != "Linux":
            self.cpp_info.debug.libs = ['benchmarkd']
            self.cpp_info.release.libs = ['benchmark']
        else:
            self.cpp_info.libs =  ['benchmark']
```
However, conan is not able to locate the libraries at all, I get the output: 

Library benchmarkd not found in package, might be system one
Library benchmark not found in package, might be system one

I looked at the generated conanbuildinfo.cmake, and noted that starting with conan 1.3, the following call is made: 

```
conan_package_library_targets("${CONAN_LIBS_GBENCHMARK_DEBUG}" "${CONAN_LIB_DIRS_GBENCHMARK_DEBUG}"
                                  CONAN_PACKAGE_TARGETS_GBENCHMARK_DEBUG "" "debug" GBenchmark)
```
But the variable CONAN_LIB_DIRS_GBENCHMARK_DEBUG is not set (but used to be set on conan 1.2). 

I have the following: 

set(CONAN_LIB_DIRS_GBENCHMARK "C:/Users/benjamin.schindler/.conan/data/GBenchmark/1.4.0/virtamed/testing/package/98aaa1d6a87f0b802f745a8ec2e8347f131e031c/lib")
set(CONAN_LIB_DIRS_GBENCHMARK_DEBUG )
set(CONAN_LIB_DIRS_GBENCHMARK_RELEASE )

With using 1.2.3, those variables are set: 

set(CONAN_LIB_DIRS_GBENCHMARK "C:/Users/benjamin.schindler/.conan/data/GBenchmark/1.4.0/virtamed/testing/package/98aaa1d6a87f0b802f745a8ec2e8347f131e031c/lib")
set(CONAN_LIB_DIRS_GBENCHMARK_DEBUG "C:/Users/benjamin.schindler/.conan/data/GBenchmark/1.4.0/virtamed/testing/package/98aaa1d6a87f0b802f745a8ec2e8347f131e031c/lib")
set(CONAN_LIB_DIRS_GBENCHMARK_RELEASE "C:/Users/benjamin.schindler/.conan/data/GBenchmark/1.4.0/virtamed/testing/package/98aaa1d6a87f0b802f745a8ec2e8347f131e031c/lib")


This issue currently blocks us from going beyond 1.2.3 (looks like a regression issue to me)


Discussion:
Yes, could be a regression, checking it right now, thanks for reporting
Could you post your full ``package_info()`` method. There was a bug that was corrected related to this, it would be useful to check if you are also setting other paths. Thanks!
The related PR is: https://github.com/conan-io/conan/pull/2740

That's the full package_info(), pretty boring tbh. 
```
def package_info(self):
        if self.settings.os != "Linux":
            self.cpp_info.debug.libs = ['benchmarkd',  'output_test_helperd']
            self.cpp_info.release.libs = ['benchmark', 'output_test_helper']
        else:
            self.cpp_info.libs =  ['benchmark', 'output_test_helper']

        if self.settings.os != "Linux":
            self.cpp_info.libs.append("shlwapi")
```
All libraries are within the same folder and include folders are naturally the same so there is essentially nothing to do

Resolving patch:
diff --git a/conans/client/generators/cmake_multi.py b/conans/client/generators/cmake_multi.py
--- a/conans/client/generators/cmake_multi.py
+++ b/conans/client/generators/cmake_multi.py
@@ -12,12 +12,14 @@ def extend(cpp_info, config):
     """
     config_info = cpp_info.configs.get(config)
     if config_info:
+        def add_lists(seq1, seq2):
+            return seq1 + [s for s in seq2 if s not in seq1]
         result = CppInfo(config_info.rootpath)
-        result.includedirs = cpp_info.includedirs + config_info.includedirs
-        result.libdirs = cpp_info.libdirs + config_info.libdirs
-        result.bindirs = cpp_info.bindirs + config_info.bindirs
-        result.resdirs = cpp_info.resdirs + config_info.resdirs
-        result.builddirs = cpp_info.builddirs + config_info.builddirs
+        result.includedirs = add_lists(cpp_info.includedirs, config_info.includedirs)
+        result.libdirs = add_lists(cpp_info.libdirs, config_info.libdirs)
+        result.bindirs = add_lists(cpp_info.bindirs, config_info.bindirs)
+        result.resdirs = add_lists(cpp_info.resdirs, config_info.resdirs)
+        result.builddirs = add_lists(cpp_info.builddirs, config_info.builddirs)
         result.libs = cpp_info.libs + config_info.libs
         result.defines = cpp_info.defines + config_info.defines
         result.cflags = cpp_info.cflags + config_info.cflags
diff --git a/conans/model/build_info.py b/conans/model/build_info.py
--- a/conans/model/build_info.py
+++ b/conans/model/build_info.py
@@ -95,6 +95,11 @@ def _get_cpp_info():
             result = _CppInfo()
             result.rootpath = self.rootpath
             result.sysroot = self.sysroot
+            result.includedirs.append(DEFAULT_INCLUDE)
+            result.libdirs.append(DEFAULT_LIB)
+            result.bindirs.append(DEFAULT_BIN)
+            result.resdirs.append(DEFAULT_RES)
+            result.builddirs.append("")
             return result
 
         return self.configs.setdefault(config, _get_cpp_info())


Test patch:
diff --git a/conans/test/generators/cmake_test.py b/conans/test/generators/cmake_test.py
--- a/conans/test/generators/cmake_test.py
+++ b/conans/test/generators/cmake_test.py
@@ -47,7 +47,8 @@ def variables_setup_test(self):
 
     def paths_cmake_multi_user_vars_test(self):
         settings_mock = namedtuple("Settings", "build_type, os, os_build, constraint")
-        conanfile = ConanFile(None, None, settings_mock("Release", None, None, lambda x, raise_undefined_field: x), None)
+        conanfile = ConanFile(None, None, settings_mock("Release", None, None,
+                                                        lambda x, raise_undefined_field: x), None)
         ref = ConanFileReference.loads("MyPkg/0.1@lasote/stables")
         tmp_folder = temp_folder()
         save(os.path.join(tmp_folder, "lib", "mylib.lib"), "")
@@ -63,6 +64,26 @@ def paths_cmake_multi_user_vars_test(self):
         self.assertIn('set(CONAN_INCLUDE_DIRS_MYPKG_RELEASE "root_folder/include")', cmake_lines)
         self.assertIn('set(CONAN_LIB_DIRS_MYPKG_RELEASE "root_folder/lib")', cmake_lines)
 
+    def paths_cmake_test(self):
+        settings_mock = namedtuple("Settings", "build_type, os, os_build, constraint, items")
+        conanfile = ConanFile(None, None, settings_mock(None, None, None,
+                                                        lambda x, raise_undefined_field: x,
+                                                        lambda: {}), None)
+        ref = ConanFileReference.loads("MyPkg/0.1@lasote/stables")
+        tmp_folder = temp_folder()
+        save(os.path.join(tmp_folder, "lib", "mylib.lib"), "")
+        save(os.path.join(tmp_folder, "include", "myheader.h"), "")
+        cpp_info = CppInfo(tmp_folder)
+        cpp_info.release.libs = ["hello"]
+        cpp_info.debug.libs = ["hello_D"]
+        conanfile.deps_cpp_info.update(cpp_info, ref.name)
+        generator = CMakeGenerator(conanfile)
+        content = generator.content
+        content = content.replace(tmp_folder.replace("\\", "/"), "root_folder")
+        cmake_lines = content.splitlines()
+        self.assertIn('set(CONAN_INCLUDE_DIRS_MYPKG_RELEASE "root_folder/include")', cmake_lines)
+        self.assertIn('set(CONAN_LIB_DIRS_MYPKG_RELEASE "root_folder/lib")', cmake_lines)
+
     def variables_cmake_multi_user_vars_test(self):
         settings_mock = namedtuple("Settings", "build_type, os, os_build, constraint")
         conanfile = ConanFile(None, None, settings_mock("Release", None, None, lambda x, raise_undefined_field: x), None)