Commit ba4c68b0 authored by Ben Boeckel's avatar Ben Boeckel

unix: implement packaging

parent f4484d14
......@@ -71,12 +71,12 @@ function (superbuild_add_packaging)
endif ()
foreach (generator IN LISTS generators)
#superbuild_add_extra_package_test(modelbuilder "${generator}"
# LABELS "CMB"
# TIMEOUT 1200)
#superbuild_add_extra_package_test(hydrology "${generator}"
# LABELS "CMB"
# TIMEOUT 1200)
superbuild_add_extra_package_test(modelbuilder "${generator}"
LABELS "CMB"
TIMEOUT 1200)
superbuild_add_extra_package_test(hydrology "${generator}"
LABELS "CMB"
TIMEOUT 1200)
endforeach ()
endfunction ()
......
# Consolidates platform independent stub for cmb.bundle.cmake files.
include(cmb-version)
include(paraview-version)
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
set(CPACK_RESOURCE_FILE_LICENSE
"${superbuild_source_directory}/License.txt")
set(CPACK_PACKAGE_VERSION_MAJOR ${cmb_version_major})
set(CPACK_PACKAGE_VERSION_MINOR ${cmb_version_minor})
if (cmb_version_suffix)
set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch}-${cmb_version_suffix})
else()
set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch})
endif()
SET(CPACK_PACKAGE_INSTALL_DIRECTORY
"${cmb_package_name} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"${cmb_package_name}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
if(NOT DEFINED CPACK_SYSTEM_NAME)
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
endif()
if(${CPACK_SYSTEM_NAME} MATCHES Windows)
if(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win64)
else(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win32)
endif()
endif()
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
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)
foreach (name IN LISTS ARGN)
set(plugin_directive " <Plugin name=\"${name}\" auto_load=\"1\" />\n")
string(REPLACE "</Plugins>" "${plugin_directive}</Plugins>" contents "${contents}")
endforeach ()
file(WRITE "${output}" "${contents}")
endfunction ()
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"CMB Tools for Hydrologigal Simulations")
set(CPACK_PACKAGE_NAME "CMB")
set(cmb_package_name "CMB-Hydro")
set(cmb_programs_to_install
#GeologyBuilder
SceneBuilder
ModelBuilder
MeshViewer
PointsBuilder
paraview)
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})
set(cmb_install_paraview_server TRUE)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"CMB ModelBuilder Application")
set(CPACK_PACKAGE_NAME "CMB")
set(cmb_package_name "ModelBuilder")
set(cmb_programs_to_install
ModelBuilder)
include(cmb.bundle.common)
set(cmb_plugins
smtkDiscreteSessionPlugin
smtkExodusSessionPlugin
smtkPolygonSessionPlugin
smtkRemoteSessionPlugin
smtkRemusMeshOperatorPlugin
CMB_Plugin
ModelBridge_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})
set(cmb_install_paraview_server FALSE)
set(paraview_executables)
if (cmb_install_paraview_server)
set(paraview_executables
pvserver
pvdataserver
pvrenderserver
pvbatch
pvpython)
endif ()
foreach (executable IN LISTS paraview_executables cmb_programs_to_install)
superbuild_unix_install_program("${executable}"
"paraview-${paraview_version};cmb-${cmb_version}")
endforeach ()
foreach (plugin IN LISTS cmb_plugins_to_install)
superbuild_unix_install_plugin("lib${plugin}.so"
"cmb-${cmb_version}"
";paraview-${paraview_version};cmb-${cmb_version}"
"cmb-${cmb_version}/plugins/")
endforeach ()
superbuild_unix_install_python(
"${CMAKE_INSTALL_PREFIX}"
"cmb-${cmb_version}"
MODULES smtk
shiboken
paraview
vtk
MODULE_DIRECTORIES
"${superbuild_install_location}/lib/python2.7/site-packages"
"${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
SEARCH_DIRECTORIES
"cmb-${cmb_version}"
"paraview-${paraview_version}")
install(
FILES "${cmb_plugins_file}"
DESTINATION "bin"
COMPONENT superbuild)
install(
DIRECTORY "${superbuild_install_location}/share/cmb/workflows/"
DESTINATION "share/cmb/workflows"
COMPONENT superbuild)
include(hydrology.bundle.common)
include(cmb.bundle.unix)
include(modelbuilder.bundle.common)
include(cmb.bundle.unix)
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