Do not make extra copy of public headers for external headers module
Cmake install(TARGET) copies public and private headers even if DESTINATION is unset, therefore add workaround and remove public headers before the install call. Note the reason we do not need this copy is that we install those headers with install(DIRECTORY) to keep the directory structure as it is required for example by freefont. Fixes: QTBUG-104856 Pick-to: dev 6.4.0 6.3 6.2 Change-Id: I494935d01163cee4f2f19b95aec97f5fd7a12f84 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
03c7222add
commit
40e844918a
@ -748,9 +748,8 @@ set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
|
|||||||
qt_install(DIRECTORY "${arg_EXTERNAL_HEADERS_DIR}/"
|
qt_install(DIRECTORY "${arg_EXTERNAL_HEADERS_DIR}/"
|
||||||
DESTINATION "${module_install_interface_include_dir}"
|
DESTINATION "${module_install_interface_include_dir}"
|
||||||
)
|
)
|
||||||
unset(public_header_destination)
|
get_target_property(public_header_backup ${target} PUBLIC_HEADER)
|
||||||
else()
|
set_property(TARGET ${target} PROPERTY PUBLIC_HEADER "")
|
||||||
set(public_header_destination PUBLIC_HEADER DESTINATION "${module_install_interface_include_dir}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt_install(TARGETS ${exported_targets}
|
qt_install(TARGETS ${exported_targets}
|
||||||
@ -760,8 +759,12 @@ set(QT_LIBINFIX \"${QT_LIBINFIX}\")")
|
|||||||
ARCHIVE DESTINATION ${INSTALL_LIBDIR}
|
ARCHIVE DESTINATION ${INSTALL_LIBDIR}
|
||||||
FRAMEWORK DESTINATION ${INSTALL_LIBDIR}
|
FRAMEWORK DESTINATION ${INSTALL_LIBDIR}
|
||||||
PRIVATE_HEADER DESTINATION "${module_install_interface_private_include_dir}"
|
PRIVATE_HEADER DESTINATION "${module_install_interface_private_include_dir}"
|
||||||
${public_header_destination}
|
PUBLIC_HEADER DESTINATION "${module_install_interface_include_dir}"
|
||||||
)
|
)
|
||||||
|
if(arg_EXTERNAL_HEADERS_DIR)
|
||||||
|
set_property(TARGET ${target} PROPERTY PUBLIC_HEADER ${public_header_backup})
|
||||||
|
unset(public_header_backup)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
qt_apply_rpaths(TARGET "${target}" INSTALL_PATH "${INSTALL_LIBDIR}" RELATIVE_RPATH)
|
qt_apply_rpaths(TARGET "${target}" INSTALL_PATH "${INSTALL_LIBDIR}" RELATIVE_RPATH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user