title: ConanException: Package require 'qt' not used in components requires
body: <p>I've created a project which has two targets, <code>core.dll</code> and <code>runner.exe</code>.
  <code>Core.dll</code> depends on <code>Qt5::Core</code>.
  <code>Runner.exe</code> depends on <code>core.dll</code>.</p>
  <p>Also I've created a conan recipe <code>conanfile.py</code>.</p>
  <p>I defined <code>qt</code> in <code>requirements:</code></p>
  <pre><code>def requirements(self):
          self.requires(&quot;qt/e5.12.4@mikhail/testing&quot;, private=False)
  </code></pre>
  <p>In <code>package_info</code> I use <code>components</code>:</p>
  <pre><code>def package_info(self):
      self.cpp_info.components[&quot;core&quot;].libs = [&quot;core&quot;]
      self.cpp_info.components[&quot;core&quot;].requires = [&quot;qt&quot;]
      self.cpp_info.components[&quot;runner&quot;].requires = [&quot;core&quot;]
  </code></pre>
  <p>On build I have error:</p>
  <blockquote>
  <p>File
  &quot;C:\Users\user\AppData\Roaming\Python\Python37\site-packages\conans\client\installer.py&quot;,
  line 571, in _call_package_info
  raise ConanException(&quot;%s package_info(): %s&quot; % (str(conanfile), e)) conans.errors.ConanException: lexer/1.0.0@mikhail/testing
  package_info(): <strong>Package require 'qt' not used in components requires</strong></p>
  </blockquote>
  <p>I assume I miss some detail. I would appreciate any advice or reference to read about.</p>
  <p><strong>conanfile.py</strong></p>
  <pre><code>from conans import ConanFile, CMake, tools
  
  import os.path
  
  class LexerConan(ConanFile):
      name = &quot;lexer&quot;
      license = &quot;Proprietary&quot;
      author = &quot;Mikhail&quot;
      topics = (&quot;lexer&quot;)
      version = &quot;1.0.0&quot;
  
      settings = {
          &quot;os&quot;: [&quot;Windows&quot;],
          &quot;compiler&quot;: None,
          &quot;build_type&quot;: None,
          &quot;arch&quot;: None
      }
      options = {&quot;shared&quot;: [True, False]}
      default_options = {
          &quot;shared&quot;: False
      }
      
      generators = &quot;cmake_paths&quot;
      exports_sources = &quot;*&quot;
      no_copy_source = True
  
      def build_requirements(self):
          self.build_requires(&quot;cmake-toolkit/1.0.0@mikhail/stable&quot;)
          self.build_requires(&quot;cmake/3.17.1&quot;)
  
      def requirements(self):
          self.requires(&quot;qt/e5.12.4@mikhail/testing&quot;, private=False)
  
      def build(self):
          cmake = CMake(self)
          cmake.definitions[&quot;VERSION&quot;] = self.version
          cmake.definitions[&quot;CMAKE_TOOLCHAIN_FILE&quot;] = os.path.join(self.build_folder, &quot;conan_paths.cmake&quot;)
          cmake.configure()
          cmake.build()
          
      def package(self):
          cmake = CMake(self)
          cmake.configure()
          cmake.install()
  
      def package_info(self): #ERROR ConanException: Package require 'qt' not used in components requires
          self.cpp_info.components[&quot;core&quot;].libs = [&quot;core&quot;]
          self.cpp_info.components[&quot;core&quot;].requires = [&quot;qt&quot;]
          self.cpp_info.components[&quot;runner&quot;].requires = [&quot;core&quot;]
          
  </code></pre>
  <p><strong>If you need more details I created a reference <a href="https://github.com/MGritsenko/Example_CMake_Conan" rel="nofollow noreferrer">project</a> on GitHub</strong></p>