Don't export Qt6::ATSPI2_nolink target in Qt6GuiTargets.cmake
We don't have any APSPI2 includes in our public headers and should therefore not export the target that provides ATSPI2 include paths for consumers. Link against PkgConfig::ATSPI2 instead of the _nolink target. The former will not be exported. Pick-to: 6.2 Fixes: QTBUG-97023 Change-Id: I4b12e0c2230917feeb963c02565e6db24f757bd3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
c6ae39c45f
commit
f6cd55445d
@ -787,6 +787,26 @@ function(qt_internal_link_internal_platform_for_object_library target)
|
||||
target_link_libraries("${target}" PRIVATE Qt::PlatformModuleInternal)
|
||||
endfunction()
|
||||
|
||||
# Use ${dep_target}'s include dirs when building ${target}.
|
||||
#
|
||||
# Assumes ${dep_target} is an INTERFACE_LIBRARY that only propagates include dirs and ${target}
|
||||
# is a Qt module / plugin.
|
||||
#
|
||||
# Building ${target} requires ${dep_target}'s include dirs.
|
||||
# Using ${target} does not require ${dep_target}'s include dirs.
|
||||
#
|
||||
# The main use case is adding the private header-only dependency PkgConfig::ATSPI2.
|
||||
function(qt_internal_add_target_include_dirs target dep_target)
|
||||
if(NOT TARGET "${target}")
|
||||
message(FATAL_ERROR "${target} is not a valid target.")
|
||||
endif()
|
||||
if(NOT TARGET "${dep_target}")
|
||||
message(FATAL_ERROR "${dep_target} is not a valid target.")
|
||||
endif()
|
||||
|
||||
target_include_directories("${target}" PRIVATE
|
||||
"$<TARGET_PROPERTY:${dep_target},INTERFACE_INCLUDE_DIRECTORIES>")
|
||||
endfunction()
|
||||
|
||||
# Use ${dep_target}'s include dirs when building ${target} and optionally propagate the include
|
||||
# dirs to consumers of ${target}.
|
||||
@ -809,15 +829,7 @@ endfunction()
|
||||
#
|
||||
# The main use case is for propagating WrapVulkanHeaders::WrapVulkanHeaders.
|
||||
function(qt_internal_add_target_include_dirs_and_optionally_propagate target dep_target)
|
||||
if(NOT TARGET "${target}")
|
||||
message(FATAL_ERROR "${target} is not a valid target.")
|
||||
endif()
|
||||
if(NOT TARGET "${dep_target}")
|
||||
message(FATAL_ERROR "${dep_target} is not a valid target.")
|
||||
endif()
|
||||
|
||||
target_include_directories("${target}" PRIVATE
|
||||
"$<TARGET_PROPERTY:${dep_target},INTERFACE_INCLUDE_DIRECTORIES>")
|
||||
qt_internal_add_target_include_dirs(${target} ${dep_target})
|
||||
|
||||
target_link_libraries("${target}" INTERFACE "$<TARGET_NAME_IF_EXISTS:${dep_target}>")
|
||||
|
||||
|
@ -498,7 +498,13 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility AND WIN32
|
||||
accessible/windows/apisupport/uiatypes_p.h
|
||||
)
|
||||
|
||||
qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility AND QT_FEATURE_accessibility_atspi_bridge
|
||||
if(QT_FEATURE_accessibility AND QT_FEATURE_accessibility_atspi_bridge)
|
||||
set(atspi_accessibility ON)
|
||||
else()
|
||||
set(atspi_accessibility OFF)
|
||||
endif()
|
||||
|
||||
qt_internal_extend_target(Gui CONDITION atspi_accessibility
|
||||
SOURCES
|
||||
accessible/linux/atspiadaptor.cpp accessible/linux/atspiadaptor_p.h
|
||||
accessible/linux/dbusconnection.cpp accessible/linux/dbusconnection_p.h
|
||||
@ -519,10 +525,12 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_accessibility AND QT_FEATURE_
|
||||
DBUS_INTERFACE_FLAGS
|
||||
"-i" "QtGui/private/qspi_struct_marshallers_p.h"
|
||||
# special case end
|
||||
LIBRARIES
|
||||
PkgConfig::ATSPI2_nolink
|
||||
)
|
||||
|
||||
if(atspi_accessibility)
|
||||
qt_internal_add_target_include_dirs(Gui PkgConfig::ATSPI2)
|
||||
endif()
|
||||
|
||||
qt_internal_extend_target(Gui CONDITION QT_FEATURE_action
|
||||
SOURCES
|
||||
kernel/qaction.cpp kernel/qaction.h kernel/qaction_p.h
|
||||
|
Loading…
Reference in New Issue
Block a user