mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 00:19:46 +01:00
Fixed linking for HighGUI against Qt 6.9 and newer
Use `link_libraries` instead of `add_defintions` to link against Qt 6.9 and newer to avoid un-expanded generator expressions from Qt cmake files being appended to linker flags when building the HighGUI module. The actual bug is likely in how Qt cmake files end up with these un-expanded generator expressions in the first place — see discussion in https://bugreports.qt.io/browse/QTBUG-134774 — but the recommended way to link against the library is to use `link_libraries` anyway, so this fix should do the trick. Fixes issue #27223.
This commit is contained in:
parent
563ef8ff97
commit
e7728bb27d
|
|
@ -125,7 +125,7 @@ elseif(HAVE_QT)
|
|||
endif()
|
||||
|
||||
foreach(dt_dep ${qt_deps})
|
||||
add_definitions(${Qt${QT_VERSION_MAJOR}${dt_dep}_DEFINITIONS})
|
||||
link_libraries(${Qt${QT_VERSION_MAJOR}${dt_dep}})
|
||||
include_directories(${Qt${QT_VERSION_MAJOR}${dt_dep}_INCLUDE_DIRS})
|
||||
list(APPEND HIGHGUI_LIBRARIES ${Qt${QT_VERSION_MAJOR}${dt_dep}_LIBRARIES})
|
||||
endforeach()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user