title: How to specify the output directory of a given DLL?
body: <p>I'm using the following <code>src/CMakeLists.txt</code>:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.1.0)
  project(foo)
  add_library(foo SHARED foo.cpp)
  set_target_properties(foo
      PROPERTIES
          LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/$&lt;CONFIG&gt;/subdir
  )
  </code></pre>
  
  <p>And on Windows, I'm building the library using:</p>
  
  <pre><code>mkdir build
  cd build
  cmake ../src
  cmake --build .
  </code></pre>
  
  <p><strong>Output File:</strong> <code>~/build/Debug/foo.dll</code></p>
  
  <p><strong>Expected Output File:</strong> <code>~/build/Debug/subdir/foo.dll</code></p>
  
  <p>What am I doing wrong?</p>
  
  <p>It works fine on platforms other than Windows, and it seems like it should work according to the following documentation:</p>
  
  <ul>
  <li><a href="https://cmake.org/cmake/help/v3.14/command/add_library.html" rel="noreferrer">add_library</a></li>
  <li><a href="https://cmake.org/cmake/help/v3.14/command/set_target_properties.html" rel="noreferrer">set_target_properties</a></li>
  <li><a href="https://cmake.org/cmake/help/v3.14/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html" rel="noreferrer">LIBRARY_OUTPUT_DIRECTORY</a></li>
  <li><a href="https://cmake.org/cmake/help/v3.14/manual/cmake-generator-expressions.7.html" rel="noreferrer">cmake-generator-expressions</a>.</li>
  </ul>