Commit 0cfab4b4 authored by John Tourtellott's avatar John Tourtellott

Add SLACTools plugin to modelbuilder package

parent 4cd61afb
set(cmb_plugins)
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 ()
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 ()
endforeach ()
endforeach ()
foreach(program IN LISTS cmb_programs_to_install)
set(plugins "${cmb_plugins_${program}}")
set(plugins)
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 ()
if (program STREQUAL "modelbuilder")
# Install CMB plugins in modelbuilder app
foreach(plugin IN LISTS cmb_plugins_cmb)
list(APPEND plugin_paths "${superbuild_install_location}/Applications/modelbuilder.app/Contents/Plugins/lib${plugin}.dylib")
endforeach()
list(APPEND plugins ${cmb_plugins_cmb})
# Install paraview plugins in modelbuilder app
foreach (plugin IN LISTS cmb_plugins_paraview)
list(APPEND plugin_paths "${superbuild_install_location}/Applications/paraview.app/Contents/Plugins/lib${plugin}.dylib")
endforeach()
list(APPEND plugins ${cmb_plugins_paraview})
endif()
superbuild_apple_create_app(
"\${CMAKE_INSTALL_PREFIX}/${cmb_package}"
"${program}.app"
"${superbuild_install_location}/Applications/${program}.app/Contents/MacOS/${program}"
CLEAN
FAKE_PLUGIN_PATHS
PLUGINS ${plugin_paths}
SEARCH_DIRECTORIES
"${superbuild_install_location}/lib")
......
......@@ -32,7 +32,7 @@ list(REMOVE_DUPLICATES cmb_programs_to_install)
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")
set(plugin_directive " <Plugin name=\"${name}\" auto_load=\"0\" />\n")
string(REPLACE "</Plugins>" "${plugin_directive}</Plugins>" contents "${contents}")
endforeach ()
file(WRITE "${output}" "${contents}")
......@@ -106,14 +106,9 @@ set(cmb_plugins_cmb
cmbPostProcessingModePlugin
)
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)
set(cmb_plugins_paraview
SLACTools
)
set(cmb_python_modules
smtk
......
......@@ -47,6 +47,28 @@ foreach (plugin IN LISTS plugins)
EXCLUDE_REGEXES ${exclude_regexes})
endforeach ()
foreach (plugin IN LISTS cmb_plugins_cmb)
superbuild_unix_install_plugin("lib${plugin}.so"
"lib"
"lib/${plugin}"
SEARCH_DIRECTORIES "${library_paths}"
LOCATION "lib/plugins"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes}
)
endforeach ()
foreach (plugin IN LISTS cmb_plugins_paraview)
superbuild_unix_install_plugin("lib${plugin}.so"
"lib"
"lib/paraview-${paraview_version}/plugins/${plugin}"
SEARCH_DIRECTORIES "${library_paths}"
LOCATION "lib/paraview-${paraview_version}/plugins/${plugin}/"
INCLUDE_REGEXES ${include_regexes}
EXCLUDE_REGEXES ${exclude_regexes}
)
endforeach ()
superbuild_unix_install_python(
LIBDIR "lib/cmb-${cmb_version}"
MODULES ${cmb_python_modules}
......
......@@ -73,6 +73,22 @@ if (plugins)
endforeach ()
endif()
foreach (plugin IN LISTS cmb_plugins_cmb)
set(plugin_library_paths ${library_paths})
list(APPEND plugin_library_paths "bin/${plugin}")
superbuild_windows_install_plugin("${plugin}.dll"
"bin"
"${plugin_library_paths}")
endforeach ()
foreach (plugin IN LISTS cmb_plugins_paraview)
set(plugin_library_paths ${library_paths})
list(APPEND plugin_library_paths "bin/plugins/${plugin}")
superbuild_windows_install_plugin("${plugin}.dll"
"bin"
"${plugin_library_paths}")
endforeach ()
superbuild_windows_install_python(
MODULES ${cmb_python_modules}
MODULE_DIRECTORIES "${superbuild_install_location}/bin/Lib/site-packages"
......
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