Commit b4a6f72e authored by Ben Boeckel's avatar Ben Boeckel

qt5: install plugins

parent 15a2d8a3
......@@ -152,6 +152,14 @@ function (superbuild_add_packaging)
QT_LIBRARY_DIR)
endif ()
if (qt5_built_by_superbuild)
set(Qt5_DIR "${superbuild_install_location}/lib/cmake/Qt5")
endif ()
if (USE_SYSTEM_qt5)
list(APPEND superbuild_export_variables
Qt5_DIR)
endif ()
include(cmb.suffix)
list(APPEND superbuild_export_variables
CMB_PACKAGE_SUFFIX)
......
......@@ -119,6 +119,18 @@ foreach(program IN LISTS cmb_programs_to_install)
DESTINATION "${cmb_package}/Contents/Resources"
COMPONENT "superbuild")
endif ()
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_apple_install_module(
"\${CMAKE_INSTALL_PREFIX}/${cmb_package}"
"${program}.app"
"${qt5_plugin_path}"
"Contents/Plugins/${qt5_plugin_group}"
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
endforeach ()
# FIXME: Install inside of each application?
......
......@@ -128,6 +128,36 @@ if (paraviewweb_enabled)
endif ()
endif ()
if (qt5_enabled)
include(qt5.functions)
set(qt5_plugin_prefix)
if (NOT WIN32)
set(qt5_plugin_prefix "lib")
endif ()
set(qt5_plugins
sqldrivers/${qt5_plugin_prefix}qsqlite)
if (WIN32)
list(APPEND qt5_plugins
platforms/qwindows)
elseif (APPLE)
list(APPEND qt5_plugins
platforms/libqcocoa
printsupport/libcocoaprintersupport)
elseif (UNIX)
list(APPEND qt5_plugins
platforms/libqxcb
platforminputcontexts/libcomposeplatforminputcontextplugin
xcbglintegrations/libqxcb-glx-integration)
endif ()
superbuild_install_qt5_plugin_paths(qt5_plugin_paths ${qt5_plugins})
else ()
set(qt5_plugin_paths)
endif ()
function (cmb_install_pdf project filename)
if (${project}_enabled)
install(
......
......@@ -102,3 +102,23 @@ install(
install(CODE
"file(MAKE_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib/paraview-${paraview_version}\")"
COMPONENT superbuild)
if (qt5_enabled)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" "")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf"
DESTINATION "lib/paraview-${paraview_version}"
COMPONENT superbuild)
endif ()
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_unix_install_plugin("${qt5_plugin_path}"
"lib/paraview-${paraview_version}"
"lib/paraview-${paraview_version}/plugins/${qt5_plugin_group}/"
LOADER_PATHS "${library_paths}"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes})
endforeach ()
......@@ -121,3 +121,22 @@ install(
DIRECTORY "${superbuild_install_location}/share/cmb/workflows/"
DESTINATION "share/cmb/workflows"
COMPONENT superbuild)
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_windows_install_plugin(
"${qt5_plugin_path}"
"bin/${qt5_plugin_group}"
"${library_paths}")
endforeach ()
if (qt5_enabled)
foreach (qt5_opengl_lib IN ITEMS opengl32sw libEGL libGLESv2)
superbuild_windows_install_plugin(
"${Qt5_DIR}/../../../bin/${qt5_opengl_lib}.dll"
"bin"
"${library_paths}")
endforeach ()
endif ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment