File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,17 @@ endif()
2121if (QT6_INSTALL_ROOT)
2222 list (PREPEND CMAKE_PREFIX_PATH "${QT6_INSTALL_ROOT} " )
2323endif ()
24+ # Must be set before find_package -- CMake snapshots this into each imported target's
25+ # MAP_IMPORTED_CONFIG_FASTDEBUG property at target-creation time, not at link time.
26+ # The list entries are tried in order:
27+ # "Debug" -- matches the per-config IMPORTED_LOCATION_DEBUG on Qt's libraries.
28+ # "Release" -- per-config fallback if any target ships only a Release variant.
29+ # "" -- the empty entry means "fall back to the suffix-less IMPORTED_LOCATION".
30+ # Required because Qt's host tools (uic/moc/rcc/qhelpgenerator) set
31+ # only IMPORTED_LOCATION (no IMPORTED_CONFIGURATIONS), so without this
32+ # CMake errors with "IMPORTED_LOCATION not set for imported target
33+ # Qt5::uic configuration FastDebug".
34+ set (CMAKE_MAP_IMPORTED_CONFIG_FASTDEBUG Debug Release "" )
2435
2536find_package (Qt6 REQUIRED COMPONENTS Core Widgets OpenGL Help )
2637include (source_groups.cmake )
You can’t perform that action at this time.
0 commit comments