forked from qt-creator/qt-creator
cmake build: Map generic IMPORTED_LOCATION for Qt6 tools
There once was a time where the Qt6 build only set IMPORTED_LOCATION_<CONFIG> but nowadays it also sets IMPORTED_LOCATION. Use the latter to make it work with both debug and release builds of Qt6. Change-Id: Ic8b14209cb97b47eb6136e23390045e115a12ac0 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ set(Qt5_VERSION ${Qt6_VERSION})
|
||||
foreach(tool qmake lrelease moc rcc qhelpgenerator)
|
||||
if (TARGET Qt6::${tool} AND NOT TARGET Qt5::${tool})
|
||||
add_executable(Qt5::${tool} IMPORTED GLOBAL)
|
||||
get_target_property(imported_location Qt6::${tool} IMPORTED_LOCATION_RELEASE)
|
||||
get_target_property(imported_location Qt6::${tool} IMPORTED_LOCATION)
|
||||
set_target_properties(Qt5::${tool} PROPERTIES IMPORTED_LOCATION "${imported_location}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
Reference in New Issue
Block a user