title: CMake TARGET_RUNTIME_DLLS is empty
body: <p>I have git cloned, built (with MSVC for both Debug and Release) and then installed wxWidgets:</p>
  <pre><code>cmake -B build wxWidgets
  cmake --build build --config &lt;CONFIG&gt;
  cmake --install build --prefix my_install --config &lt;CONFIG&gt;
  </code></pre>
  <p>with <code>&lt;CONFIG&gt; = Debug</code> and <code>&lt;CONFIG&gt; = Release</code>.</p>
  <p>Then I used the following CMake script to link against it, as <a href="https://wiki.wxwidgets.org/CMake" rel="nofollow noreferrer">suggested by the wiki</a>:</p>
  <pre><code>cmake_minimum_required(VERSION 3.16)
  project(Test)
  
  add_executable(Test WIN32 Main.cpp)
  
  # wxWidgets
  SET(wxWidgets_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../thirdparty/my_install)
  find_package(wxWidgets COMPONENTS core base REQUIRED)
  include(${wxWidgets_USE_FILE})
  target_link_libraries(Test PRIVATE ${wxWidgets_LIBRARIES})
  
  # Copy runtime DLLs to the directory of the executable.
  add_custom_command(TARGET Test POST_BUILD
      COMMAND ${CMAKE_COMMAND} -E echo &quot;Runtime Dlls: $&lt;TARGET_RUNTIME_DLLS:Test&gt;&quot;
          )
  </code></pre>
  <p>My goal is to automatically copy the DLLs into the directory of the built executable, so that they can be found at runtime. For that I'm using the <code>TARGET_RUNTIME_DLLS</code> generator expression (follwing the <a href="https://cmake.org/cmake/help/git-stage/manual/cmake-generator-expressions.7.html#genex:TARGET_RUNTIME_DLLS" rel="nofollow noreferrer">sample code in the docs</a>). In the code above, I only print out the expression at build time for testing purposes. The problem is that it is empty.</p>
  <p>The approach worked for me before when installing and linking SDL, but SDL provides package configuration files which create imported targets, defining the DLL location(s) via <code>IMPORTED_LOCATION_RELEASE</code> or <code>IMPORTED_LOCATION_DEBUG</code>. For wxWidgets one is apparently supposed to use the FindwxWidgets.cmake script shipped with CMake, which sadly doesn't define the produced binaries. Maybe that's why <code>TARGET_RUNTIME_DLLS</code> isn't populated.</p>
  <p><strong>Does anyone know, either how to get <code>TARGET_RUNTIME_DLLS</code> filled or how to obtain the list of built wxWidgets DLLs for the current configuration (Release/Debug) post build copying?</strong></p>
  <p>Thanks a lot in advance!</p>