Qt : Add Qt5XcbQpa required by xcb platform plugin

This commit is contained in:
Magne Sjaastad 2020-06-08 16:37:40 +02:00
parent 5d1ffec73d
commit c1ca5054e8

View File

@ -650,15 +650,26 @@ if (RESINSIGHT_PRIVATE_INSTALL)
mark_as_advanced(FORCE RESINSIGHT_QT5_BUNDLE_LIBRARIES)
if (RESINSIGHT_QT5_BUNDLE_LIBRARIES)
message( STATUS "Bundling of Qt5 libraries is enabled" )
# Get root directory
get_property(_filepath TARGET "Qt5::Core" PROPERTY LOCATION_RELEASE)
get_filename_component(_dir ${_filepath} PATH)
foreach (qtlib ${QT_LIBRARIES})
get_target_property(FILE_NAME_FULL_PATH ${qtlib} LOCATION)
message (STATUS "${qtlib} location on disk - ${FILE_NAME_FULL_PATH}")
get_filename_component(FILE_NAME_WE ${FILE_NAME_FULL_PATH} NAME_WE)
set(FILE_NAME_FOR_INSTALL "${FILE_NAME_WE}.so.5")
message (STATUS "${qtlib} filename for install - ${FILE_NAME_FOR_INSTALL}")
install(FILES ${FILE_NAME_FULL_PATH} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} RENAME ${FILE_NAME_FOR_INSTALL} )
message (STATUS "${FILE_NAME_WE} name without ext - ${FILE_NAME_WE}")
list( APPEND QT_INSTALL_FILES_WITHOUT_EXTENSION ${FILE_NAME_WE})
endforeach()
# XcbQpa is used by libXcb.so required by platform plugin xcb
list( APPEND QT_INSTALL_FILES_WITHOUT_EXTENSION libQt5XcbQpa)
foreach (installfile ${QT_INSTALL_FILES_WITHOUT_EXTENSION})
file(GLOB FILE_AND_SYMLINKS ${_dir}/${installfile}.so*)
install(FILES ${FILE_AND_SYMLINKS} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
endforeach()
endif(RESINSIGHT_QT5_BUNDLE_LIBRARIES)