Commit 9f7f531e authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'sb-plugin-update'

4239fa92 apple: fake up plugin paths
85e7e5c1 superbuild: bump for the plugin hack
e5cc2032 cmb: install paraview module for pvpython
c22450ee plugins: install .plugins file on a per-app basis
5322a851

 paraview: install pygments and six
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !148
parents e37deb09 4239fa92
set(cmb_plugins)
foreach (cmb_plugin IN LISTS cmb_plugins_to_install)
foreach (cmb_plugin IN LISTS cmb_plugins_all)
if (EXISTS "${superbuild_install_location}/Applications/ModelBuilder.app/Contents/Libraries/lib${cmb_plugin}.dylib")
list(APPEND cmb_plugins
${cmb_plugin})
set("cmb_plugin_path_${cmb_plugin}"
"${superbuild_install_location}/Applications/ModelBuilder.app/Contents/Libraries/lib${cmb_plugin}.dylib")
continue ()
endif ()
......@@ -9,6 +11,8 @@ foreach (cmb_plugin IN LISTS cmb_plugins_to_install)
foreach (path IN ITEMS "" "cmb-${cmb_version}" "paraview-${paraview_version}")
if (EXISTS "${superbuild_install_location}/lib/${path}/lib${cmb_plugin}.dylib")
list(APPEND cmb_plugins
${cmb_plugin})
set("cmb_plugin_path_${cmb_plugin}"
"${superbuild_install_location}/lib/${path}/lib${cmb_plugin}.dylib")
break ()
endif ()
......@@ -18,18 +22,29 @@ endforeach ()
set(python_modules)
if (pythongirderclient_enabled)
list(APPEND python_modules
six
requests
girder_client)
endif ()
foreach(program IN LISTS cmb_programs_to_install)
set(plugins "${cmb_plugins_${program}}")
set(plugin_paths)
foreach (plugin IN LISTS plugins)
if (NOT DEFINED "cmb_plugin_path_${plugin}")
message(FATAL_ERROR "The application ${program} needs the ${plugin} plugin, but it was not found.")
endif ()
list(APPEND plugin_paths
"${cmb_plugin_path_${plugin}}")
endforeach ()
superbuild_apple_create_app(
"\${CMAKE_INSTALL_PREFIX}/${cmb_package}"
"${program}.app"
"${superbuild_install_location}/Applications/${program}.app/Contents/MacOS/${program}"
CLEAN
PLUGINS ${cmb_plugins}
FAKE_PLUGIN_PATHS
PLUGINS ${plugin_paths}
SEARCH_DIRECTORIES
"${superbuild_install_location}/lib")
foreach (icon_filename MacIcon.icns pvIcon.icns)
......@@ -60,10 +75,14 @@ foreach(program IN LISTS cmb_programs_to_install)
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${cmb_package}/${program}.app/Contents/Resources/qt.conf\" \"\")"
COMPONENT superbuild)
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/${program}.plugins")
cmb_add_plugin("${plugins_file}" ${plugins})
install(
FILES "${cmb_plugins_file}"
FILES "${plugins_file}"
DESTINATION "${cmb_package}/${program}.app/Contents/Plugins"
COMPONENT superbuild)
COMPONENT superbuild
RENAME ".plugins")
superbuild_apple_install_python(
"\${CMAKE_INSTALL_PREFIX}/${cmb_package}"
......@@ -81,6 +100,7 @@ foreach(program IN LISTS cmb_programs_to_install)
"${program}.app"
MODULES paraview
pygments
six
vtk
MODULE_DIRECTORIES
"${superbuild_install_location}/Applications/paraview.app/Contents/Python"
......
......@@ -37,11 +37,8 @@ endif()
list(SORT cmb_programs_to_install)
list(REMOVE_DUPLICATES cmb_programs_to_install)
set(cmb_plugins_base_file "${CMAKE_CURRENT_BINARY_DIR}/plugins.xml")
file(WRITE "${cmb_plugins_base_file}" "<?xml version=\"1.0\"?>\n<Plugins>\n</Plugins>\n")
function (cmb_add_plugin input output)
file(READ "${input}" contents)
function (cmb_add_plugin output)
set(contents "<?xml version=\"1.0\"?>\n<Plugins>\n</Plugins>\n")
foreach (name IN LISTS ARGN)
set(plugin_directive " <Plugin name=\"${name}\" auto_load=\"1\" />\n")
string(REPLACE "</Plugins>" "${plugin_directive}</Plugins>" contents "${contents}")
......@@ -61,3 +58,29 @@ if (cmb_install_paraview_python)
pvbatch
pvpython)
endif ()
set(cmb_plugins_smtk
smtkDiscreteSessionPlugin
smtkExodusSessionPlugin
smtkPolygonSessionPlugin
smtkRemoteSessionPlugin
smtkRemusMeshOperatorPlugin)
if (cgm_enabled)
list(APPEND cmb_plugins_smtk
smtkCGMSessionPlugin)
endif ()
set(cmb_plugins_cmb
CMB_Plugin
ModelBridge_Plugin)
set(cmb_plugins_all
${cmb_plugins_smtk}
${cmb_plugins_cmb})
set(cmb_plugins_ModelBuilder
#${cmb_plugins_cmb} # Autoloaded
${cmb_plugins_smtk})
set(cmb_plugins_paraview
CMB_Plugin)
......@@ -15,20 +15,3 @@ set(cmb_install_paraview_server TRUE)
set(cmb_install_paraview_python TRUE)
include(cmb.bundle.common)
set(cmb_plugins
smtkDiscreteSessionPlugin
smtkExodusSessionPlugin
smtkPolygonSessionPlugin
smtkRemoteSessionPlugin
smtkRemusMeshOperatorPlugin
CMB_Plugin)
set(cmb_plugins_file "${CMAKE_CURRENT_BINARY_DIR}/.plugins")
cmb_add_plugin(
"${cmb_plugins_base_file}"
"${cmb_plugins_file}"
${cmb_plugins})
set(cmb_plugins_to_install
${cmb_plugins})
......@@ -10,29 +10,3 @@ set(cmb_install_paraview_server FALSE)
set(cmb_install_paraview_python TRUE)
include(cmb.bundle.common)
set(cmb_plugins
smtkDiscreteSessionPlugin
smtkExodusSessionPlugin
smtkPolygonSessionPlugin
smtkRemoteSessionPlugin
smtkRemusMeshOperatorPlugin
CMB_Plugin
ModelBridge_Plugin)
if (cgm_enabled)
list(APPEND cmb_plugins
smtkCGMSessionPlugin)
endif ()
set(cmb_plugins_file "${CMAKE_CURRENT_BINARY_DIR}/.plugins")
cmb_add_plugin(
"${cmb_plugins_base_file}"
"${cmb_plugins_file}"
${cmb_plugins})
set(cmb_plugins_to_install
${cmb_plugins})
list(REMOVE_ITEM cmb_plugins_to_install
CMB_Plugin
ModelBridge_Plugin)
set(plugins)
foreach (executable IN LISTS paraview_executables cmb_programs_to_install)
superbuild_unix_install_program("${executable}"
"paraview-${paraview_version};cmb-${cmb_version}")
list(APPEND plugins
${cmb_plugins_${executable}})
endforeach ()
foreach (plugin IN LISTS cmb_plugins_to_install)
list(REMOVE_DUPLICATES plugins)
foreach (plugin IN LISTS plugins)
superbuild_unix_install_plugin("lib${plugin}.so"
"cmb-${cmb_version}"
";paraview-${paraview_version};cmb-${cmb_version}"
......@@ -13,7 +18,6 @@ endforeach ()
set(python_modules)
if (pythongirderclient_enabled)
list(APPEND python_modules
six
requests
girder_client)
endif ()
......@@ -24,6 +28,8 @@ superbuild_unix_install_python(
MODULES smtk
shiboken
paraview
pygments
six
vtk
${python_modules}
MODULE_DIRECTORIES
......@@ -33,6 +39,19 @@ superbuild_unix_install_python(
"cmb-${cmb_version}"
"paraview-${paraview_version}")
if (cmb_install_paraview_python)
superbuild_unix_install_python(
"${CMAKE_INSTALL_PREFIX}"
"paraview-${paraview_version}"
MODULES paraview
vtk
MODULE_DIRECTORIES
"${superbuild_install_location}/lib/python2.7/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
SEARCH_DIRECTORIES
"paraview-${paraview_version}")
endif ()
if (pythonrequests_enabled)
install(
FILES "${superbuild_install_location}/lib/python2.7/site-packages/requests/cacert.pem"
......@@ -43,8 +62,11 @@ endif ()
include(python.functions)
superbuild_install_superbuild_python()
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/.plugins")
cmb_add_plugin("${plugins_file}" ${plugins})
install(
FILES "${cmb_plugins_file}"
FILES "${plugins_file}"
DESTINATION "bin"
COMPONENT superbuild)
......
......@@ -20,6 +20,7 @@ if (USE_SYSTEM_qt4)
"${QT_LIBRARY_DIR}")
endif ()
set(plugins)
foreach (executable IN LISTS paraview_executables cmb_programs_to_install)
if (DEFINED "${executable}_description")
list(APPEND CPACK_NSIS_MENU_LINKS
......@@ -30,9 +31,13 @@ foreach (executable IN LISTS paraview_executables cmb_programs_to_install)
superbuild_windows_install_program("${executable}"
"${library_paths}")
list(APPEND plugins
${cmb_plugins_${executable}})
endforeach ()
foreach (plugin IN LISTS cmb_plugins_to_install)
list(REMOVE_DUPLICATES plugins)
foreach (plugin IN LISTS plugins)
superbuild_windows_install_plugin("${plugin}.dll"
"bin"
"${library_paths}")
......@@ -41,7 +46,6 @@ endforeach ()
set(python_modules)
if (pythongirderclient_enabled)
list(APPEND python_modules
six
requests
girder_client)
endif ()
......@@ -51,6 +55,8 @@ superbuild_windows_install_python(
MODULES smtk
shiboken
paraview
pygments
six
vtk
${python_modules}
MODULE_DIRECTORIES
......@@ -82,9 +88,11 @@ if (pythonrequests_enabled)
COMPONENT superbuild)
endif ()
# install the .plugins file
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/.plugins")
cmb_add_plugin("${plugins_file}" ${plugins})
install(
FILES "${cmb_plugins_file}"
FILES "${plugins_file}"
DESTINATION "bin"
COMPONENT superbuild)
......
Subproject commit e3e640096760e0a20f2b60d4bddd47decf861c9a
Subproject commit 2da6431cc9effb03bc073a00f244322eaac3aa1e
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