Skip to content

Commit dc1f970

Browse files
committed
Reapply #7450
1 parent d519df1 commit dc1f970

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

qtfred/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ endif()
2121
if(QT6_INSTALL_ROOT)
2222
list(PREPEND CMAKE_PREFIX_PATH "${QT6_INSTALL_ROOT}")
2323
endif()
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

2536
find_package(Qt6 REQUIRED COMPONENTS Core Widgets OpenGL Help)
2637
include(source_groups.cmake)

0 commit comments

Comments
 (0)