From 707b00011188f4800a1bbe108d7a1fe97f061dc1 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Mon, 9 Jan 2017 18:14:37 +0100 Subject: [PATCH] Install also multimedia and print support plugins for OS X (#4212) * Install also multimedia and print support plugins for OS X * cosmetics --- companion/src/CMakeLists.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index ad76d783c..bad82790c 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -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}\")