Commit 6545e461 authored by T.J. Corona's avatar T.J. Corona

Add plugin for resoure manager I/O

parent 92d5cb4d
......@@ -7,6 +7,7 @@ list(INSERT CMAKE_MODULE_PATH 0
macro (superbuild_setup_variables)
include(SuperbuildVersionMacros)
if (cmb_SOURCE_SELECTION STREQUAL "git")
# Assuming master; just use the latest version, but let the user set their
# own version in case it is actually a branch from some other version.
......@@ -24,6 +25,25 @@ macro (superbuild_setup_variables)
endif()
superbuild_set_version_variables(cmb "${cmb_default_version}" "cmb-version.cmake" "version.txt")
set(cmb_version "${cmb_version_major}.${cmb_version_minor}")
if (smtk_SOURCE_SELECTION STREQUAL "git" OR smtk_SOURCE_SELECTION STREQUAL "from_cmb")
# Assuming master; just use the latest version, but let the user set their
# own version in case it is actually a branch from some other version.
set(SMTK_VERSION_DEFAULT "3.0.0-develop"
CACHE STRING "The default version of SMTK to use if it cannot be detected")
mark_as_advanced(SMTK_VERSION_DEFAULT)
set(smtk_default_version "${SMTK_VERSION_DEFAULT}")
elseif (smtk_SOURCE_SELECTION STREQUAL "source")
# If it is a git repo, we'll get it that way. Otherwise, we will look at the
# `version.txt` in the checkout.
set(smtk_default_version "")
else ()
# The selection is the version number; use it.
set(smtk_default_version "${smtk_SOURCE_SELECTION}")
endif()
superbuild_set_version_variables(smtk "${smtk_default_version}" "smtk-version.cmake" "version.txt")
set(smtk_version "${smtk_version_major}.${smtk_version_minor}")
superbuild_set_version_variables(paraview "5.6.0" "paraview-version.cmake" "version.txt")
set(paraview_version "${paraview_version_major}.${paraview_version_minor}")
superbuild_set_version_variables(vtk "8.1.0" "vtk-version.cmake")
......@@ -72,6 +92,7 @@ function (superbuild_find_projects var)
qt4
qt5
remus
smtkresourcemanagerstate
smtk
smtkusersguide
szip
......
......@@ -9,6 +9,13 @@ foreach(program IN LISTS cmb_programs_to_install)
endforeach()
list(APPEND plugins ${cmb_plugins_cmb})
# Install CMB plugins in modelbuilder app
foreach(plugin IN LISTS cmb_plugins_standalone)
find_library(plugin_path "lib${plugin}.dylib" ${superbuild_install_location}/lib)
list(APPEND plugin_paths ${plugin_path})
endforeach()
list(APPEND plugins ${cmb_plugins_standalone})
# 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")
......
......@@ -106,6 +106,10 @@ set(cmb_plugins_cmb
cmbPostProcessingModePlugin
)
set(cmb_plugins_standalone
smtkReadWriteResourceManagerStatePlugin
)
if (cumulus_enabled)
set(cmb_plugins_paraview
SLACTools
......
include(smtk-version)
set(smtk_extra_cmake_args)
if (WIN32)
# On Windows we expect the Python source for module to be
......@@ -85,13 +87,12 @@ superbuild_add_project(smtk
${smtk_response_file})
if (WIN32)
set(smtk_cmakedir bin/cmake)
set(smtk_config_dir <INSTALL_DIR>/smtk/${smtk_version}/cmake)
else ()
set(smtk_cmakedir lib/cmake)
set(smtk_config_dir <INSTALL_DIR>/lib/cmake/smtk/${smtk_version})
endif ()
superbuild_add_extra_cmake_args(
-DSMTK_DIR:PATH=<INSTALL_DIR>/${smtk_cmakedir}/SMTK)
superbuild_add_extra_cmake_args(-Dsmtk_DIR:PATH=${smtk_config_dir})
if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0") OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5"))
......
set(extra_cmake_args)
if (UNIX AND NOT APPLE)
list(APPEND extra_cmake_args
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif ()
set(response_file)
if (WIN32)
# Force response file usage. The command line gets way too long on Windows
# without this. Once VTK_USE_FILE and PARAVIEW_USE_FILE are gone, this can be
# removed again.
set(response_file -DCMAKE_NINJA_FORCE_RESPONSE_FILE:BOOL=ON)
endif ()
superbuild_add_project(smtkresourcemanagerstate
DEBUGGABLE
DEFAULT_ON
DEPENDS boost cxx11 paraview qt qt5 remus smtk
CMAKE_ARGS
${extra_cmake_args}
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
${response_file})
......@@ -58,6 +58,17 @@ foreach (plugin IN LISTS cmb_plugins_cmb)
)
endforeach ()
foreach (plugin IN LISTS cmb_plugins_standalone)
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"
......
......@@ -81,6 +81,14 @@ foreach (plugin IN LISTS cmb_plugins_cmb)
"${plugin_library_paths}")
endforeach ()
foreach (plugin IN LISTS cmb_plugins_standalone)
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}")
......
......@@ -151,3 +151,7 @@ superbuild_set_revision(smtkusersguide
superbuild_set_revision(nlohmannjson
URL "http://www.computationalmodelbuilder.org/files/dependencies/json-b406e3704be9a185f1e27e35981ff6d5668dcdc3.tar.bz2"
URL_MD5 4aa8c3b403f535499cb633650d083150)
superbuild_set_revision(smtkresourcemanagerstate
GIT_REPOSITORY "https://gitlab.kitware.com/cmb/plugins/read-and-write-resource-manager-state.git"
GIT_TAG ff5aa02621c0c011d72e4bdc8c4f85c250a88f0f)
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