title: How to set Visual-Studio LinkLibraryDependencies property to yes through CMAKE
body: <p>When I generate a Visual Studio target with cmake, the generated project file contains the following in the platform properties section:</p>
  
  <pre><code>&lt;ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"&gt;
      ...
      &lt;ProjectReference&gt;
        &lt;LinkLibraryDependencies&gt;false&lt;/LinkLibraryDependencies&gt;
      &lt;/ProjectReference&gt;
      ...
  &lt;/ItemDefinitionGroup&gt;
  </code></pre>
  
  <p>I would like to set the property to true from the CMakeLists file. How do I do this?</p>
  
  <p>My project dependencies are set up using <code>TARGET_LINK_LIBRARIES</code>, but on Linux I can also use, for example:</p>
  
  <pre><code>TARGET_LINK_LIBRARIES(${targetname} "-Wl,--whole-archive" *some libs* "-Wl,--no-whole-archive")
  </code></pre>
  
  <p>This forces all symbols to link into the target.</p>
  
  <p>With visual studio the way to link all symbols is to specify:</p>
  
  <pre><code>&lt;LinkLibraryDependencies&gt;true&lt;/LinkLibraryDependencies&gt;
  </code></pre>
  
  <p>through the project settings.</p>