Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.3.1, 6.4.0 Beta2
-
None
-
21202aeaac (qt/qtinterfaceframework/dev) 84ff7c8a9c (qt/qtinterfaceframework/6.4) 84ff7c8a9c (qt/tqtc-qtinterfaceframework/6.4) 21202aeaac (qt/tqtc-qtinterfaceframework/dev) 84ff7c8a9c (qt/tqtc-qtinterfaceframework/6.4.0)
Description
The template files used to generate cmake files by qt6_ifcodegen_generate have content like
qt6_set_ifcodegen_variable(${VAR_PREFIX}_LIBRARIES Qt6::InterfaceFramework Qt6::RemoteObjects Qt6::IfRemoteObjectsHelperPrivate ) target_link_libraries(${CURRENT_TARGET} PUBLIC ${${VAR_PREFIX}_LIBRARIES} )
PUBLIC linkage when ${CURRENT_TARGET} is a plugin does not make sense.
Doing that can cause configuration failures when the target is exported and used in a different project, where the PUBLIC library target might not be available.
So the template should not use PUBLIC, but PRIVATE when the target is a plugin.
Whether PRIVATE should be used for regular module libraries, not plugins, depends on the context, and I'm missing the context due to unfamiliarity with the module and how it it's meant to be used.
Usually a library "A" should be a PUBLIC dependency of "B" if A ships header files and A's header include directories need to be passed to the compiler, when compiling B's sources.
Attachments
Issue Links
- resulted from
-
QTBUG-105215 qtinterfaceframework standalone tests fail to configure because Qt6::IfRemoteObjectsHelperPrivate is not found
-
- Closed
-