Install also multimedia and print support plugins for OS X (#4212)
* Install also multimedia and print support plugins for OS X * cosmetics
This commit is contained in:
committed by
Bertrand Songis
parent
651f7b3f93
commit
707b000111
@@ -469,10 +469,18 @@ IF(APPLE)
|
||||
# menu file
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/companion/targets/mac/qt_menu.nib DESTINATION "${companion_res_dir}" COMPONENT Runtime)
|
||||
|
||||
# manually add the cocoa plugin
|
||||
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
|
||||
install(FILES ${QPA_PLUGIN} DESTINATION "${plugin_dest_dir}/platforms/" COMPONENT Runtime)
|
||||
set(bundle_qt_libs "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/platforms/libqcocoa.dylib")
|
||||
# manually add the required plugins
|
||||
foreach (plugin ${Qt5Multimedia_PLUGINS} ${Qt5PrintSupport_PLUGINS} ${Qt5Gui_PLUGINS})
|
||||
get_target_property(QPA_PLUGIN ${plugin} LOCATION)
|
||||
get_filename_component(QPA_PLUGIN_FILENAME ${QPA_PLUGIN} NAME)
|
||||
# Todo is there a nicer way to get the QT Plugin directory name?!
|
||||
get_filename_component(QPA_PLUGIN_DIRECTORY ${QPA_PLUGIN} DIRECTORY)
|
||||
get_filename_component(QPA_PLUGIN_DIRECTORY ${QPA_PLUGIN_DIRECTORY} NAME)
|
||||
|
||||
install(FILES ${QPA_PLUGIN} DESTINATION "${plugin_dest_dir}/${QPA_PLUGIN_DIRECTORY}/" COMPONENT Runtime)
|
||||
|
||||
list(APPEND bundle_qt_libs "\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/${QPA_PLUGIN_DIRECTORY}/${QPA_PLUGIN_FILENAME}")
|
||||
endforeach()
|
||||
|
||||
# Add icon
|
||||
set(MACOSX_BUNDLE_ICON_FILE iconmac.icns)
|
||||
@@ -494,7 +502,7 @@ IF(APPLE)
|
||||
|
||||
# Include depencies (adding frameworks, fixing the embbeded libraries)
|
||||
# I get write errors without setting BU_CHMOD_BUNDLE_ITEMS even though it is
|
||||
# technically a hack (that is already is in the Bundle library ....)
|
||||
# technically a hack (that is already is in the Bundle library ...)
|
||||
install(CODE "
|
||||
include(BundleUtilities)
|
||||
file(GLOB bundle_simulator_libs \"\${CMAKE_INSTALL_PREFIX}/${companion_res_dir}/libopentx-*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
||||
|
||||
Reference in New Issue
Block a user