title: Include header of CMake targets in a object library
body: <p><strong>Scenario:</strong></p>
  
  <p>I'm porting an applications build system to CMake. Dependencies are already installed on the system or will be handled via conan.</p>
  
  <p>Lets say the project is structured as following:</p>
  
  <pre><code>- include/
    - BigFoo/
      - *.hpp
  - src/
    - BigFoo/
      - *.cpp
    - main.cpp
    - *.qml
  - test/
    - BigFoo/
      - *Test.cpp
  </code></pre>
  
  <p>My goal is to reuse the compilation output (*.o) of BigFoo in the main application and the unit tests. I don't want an internal library (*.a or *.so) for BigFoo.</p>
  
  <p>BigFoo is using Qt5 and Boost components from the target system. It also uses components provided as conan packages.</p>
  
  <p><strong>Current approach:</strong></p>
  
  <ul>
  <li>Build BigFoo as static library => handle dependencies via target_link_library()</li>
  <li>Build main.cpp and *.qml => link with BigFoo</li>
  <li>Build BigFoo/*Test.cpp => link with BigFoo</li>
  </ul>
  
  <p><strong>Desired approach:</strong></p>
  
  <ul>
  <li>Build BigFoo as object library => include dependency headers</li>
  <li>Build main.cpp, *.qml with BigFoo_Object => link dependencies</li>
  <li>Build BigFoo/*Test.cpp with BigFoo_Object => link dependencies</li>
  </ul>
  
  <p><strong>Problem of the desired approach:</strong></p>
  
  <p>I could not include dependency headers of several components (Boost::XYZ Qt5::XYZ CONAN_PKG::XYZ etc) via target_include_directories() when building an OBJECT library.</p>
  
  <pre><code>add_library(Core OBJECT)
  
  # I want to do something like this:
  target_include_directories(Core PUBLIC 
      Qt5::Core
      Qt5::Qml
      Qt5::Quick
      Qt5::Scxml
      CONAN_PKG::XYZ
      CONAN_PKG::XYZ
  )
  </code></pre>
  
  <p>The result is CMake (of course) adds header include paths like the following...</p>
  
  <pre><code>-I../../../Application/Qt5::Qml
  </code></pre>
  
  <p>And fails later because it cannot dismantle Qt include statements. </p>
  
  <p>When building a static lib the header include was handled by target_link_libraries(), I'm now a bit confussed how to do this on a OBJECT library where I do not link anything.</p>
  
  <p><strong>My Questions:</strong></p>
  
  <ol>
  <li>How can I include headers of CMake targets provided by find_package() and CONAN_PKG in a OBJECT library target?</li>
  <li>Is there is a better/nicer way of reusing BigFoo so i don't have duplicated compilation?</li>
  </ol>
  
  <p>PS: I'm using cmake 3.13</p>