Commit 6082604c authored by Ben Boeckel's avatar Ben Boeckel

cmb: add a package for just ModelBuilder

parent 891513b7
......@@ -348,7 +348,24 @@ if (cmb_ENABLED)
if(TEST_PACT_VERBOSE)
set(test_build_verbose "-V")
endif()
include(cmb.bundle OPTIONAL)
if (WIN32)
set(generators
NSIS
ZIP)
elseif (APPLE)
set(generators
DragNDrop)
else ()
set(generators
TGZ)
endif ()
foreach (generator IN LISTS generators)
cmb_superbuild_add_bundle(modelbuilder "${generator}"
LABELS "CMB"
TIMEOUT 1200)
endforeach ()
endif()
......
# set extra cpack variables before calling paraview.bundle.common
set (CPACK_GENERATOR DragNDrop)
# include some common stub.
include(cmb.bundle.common)
#set a root folder inside the package
set(Package_Folder "CMB Suite ${cmb_version_major}.${cmb_version_minor}.${cmb_version_patch}")
include(CPack)
foreach(program ${cmb_programs_to_install})
foreach(program IN LISTS cmb_programs_to_install)
install(CODE
"
......@@ -177,11 +166,3 @@ install(CODE
\"${install_location}/molequeue.app\")
"
COMPONENT superbuild)
add_test(NAME GenerateCMBPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G DragNDrop ${test_build_verbose}
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateCMBPackage PROPERTIES
LABELS "CMB"
TIMEOUT 4800)
include(modelbuilder.bundle.common)
set(Package_Folder "ModelBuilder ${cmb_version_major}.${cmb_version_minor}.${cmb_version_patch}")
include(cmb.bundle.apple)
# Consolidates platform independent stub for cmb.bundle.cmake files.
include (cmb_version)
include (paraview_version)
include(cmb_version)
include(paraview_version)
# Enable CPack packaging.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"CMB Suite of Tools.")
set(CPACK_PACKAGE_NAME "CMB")
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
set(CPACK_RESOURCE_FILE_LICENSE
"${CMBSuperBuild_SOURCE_DIR}/License.txt")
......@@ -19,9 +15,9 @@ else()
endif()
SET(CPACK_PACKAGE_INSTALL_DIRECTORY
"CMBSuite ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
"${cmb_package_name} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
"CMBSuite-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
"${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})
......@@ -37,19 +33,3 @@ if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
set(CPACK_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}")
endif()
#set the programs we want to install
set(cmb_programs_to_install
ModelBuilder
SceneBuilder
PointsBuilder
MeshViewer
paraview
)
#sort the list so the package order is reasonable and deducible to the user
list(SORT cmb_programs_to_install)
# Don't import CPack yet, let the platform specific code get another chance at
# changing the variables.
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"CMB ModelBuilder Application")
set(CPACK_PACKAGE_NAME "CMB")
set(cmb_package_name "ModelBuilder")
include(cmb.bundle.common)
#set the programs we want to install
set(cmb_programs_to_install
ModelBuilder
)
#sort the list so the package order is reasonable and deducible to the user
list(SORT cmb_programs_to_install)
# script to "bundle" cmb for unix, unlike paraview we are going to dump everything
# into bin instead of having a clear separation of bin and lib. We have too many
# libraries and executables that have this hardcoded concept that the libraries are
# directly beside the executable
include(cmb.bundle.common)
include(CPack)
# install all ParaView's shared libraries.
install(DIRECTORY "${install_location}/lib/paraview-${pv_version}"
DESTINATION "lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
# install all cmb's shared libraries.
install(DIRECTORY "${install_location}/lib/cmb-${cmb_version}"
DESTINATION "lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
#get the right version of paraview projects
foreach(prog ${cmb_programs_to_install})
if(prog STREQUAL "paraview")
set(programs_path ${install_location}/lib/paraview-${pv_version}/${prog})
else()
set(programs_path ${install_location}/lib/cmb-${cmb_version}/${prog})
endif()
install(CODE
"execute_process(COMMAND
${CMAKE_COMMAND}
-Dexecutable:PATH=${programs_path}
-Ddependencies_root:PATH=${install_location}
-Dpv_libraries_root:PATH=${install_location}/lib/paraview-${pv_version}
-Dcmb_libraries_root:PATH=${install_location}/lib/cmb-${cmb_version}
-Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib/paraview-${pv_version}
-P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)"
COMPONENT superbuild)
endforeach()
#install qt
if (qt_ENABLED AND NOT USE_SYSTEM_qt)
install(DIRECTORY
# install all qt plugins (including sqllite).
# FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
# avoid the need for plugins.
"${install_location}/plugins/"
DESTINATION "bin"
COMPONENT superbuild
PATTERN "*.a" EXCLUDE
PATTERN "paraview-${pv_version}" EXCLUDE
PATTERN "${program}-${cmb_version}" EXCLUDE
PATTERN "fontconfig" EXCLUDE
PATTERN "*.jar" EXCLUDE
PATTERN "*.debug.*" EXCLUDE
PATTERN "libboost*" EXCLUDE)
endif()
# install executables
set (executables pvserver pvdataserver pvrenderserver)
if (python_ENABLED)
set (executables ${executables} pvbatch pvpython)
# we are not building pvblot for now. Disable it.
# set (executables ${executables} pvblot)
endif()
if (qt_ENABLED)
set (executables ${executables} paraview)
endif()
foreach(executable ${executables})
install(PROGRAMS "${install_location}/bin/${executable}"
DESTINATION "bin"
COMPONENT superbuild)
endforeach()
if (cmbworkflows_ENABLED)
install(
DIRECTORY "${install_location}/share/workflows/"
DESTINATION "share/workflows/"
COMPONENT superbuild)
endif ()
#we have to install everything in bin that is an executable that we care about
#we use
install(DIRECTORY
"${install_location}/bin/"
DESTINATION "bin"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild
FILES_MATCHING
REGEX "CMB.*"
PATTERN "ModelBuilder"
PATTERN "mesh"
PATTERN "model"
PATTERN "molequeue"
PATTERN "shiboken"
)
#add the installer as a test
add_test(NAME GenerateCMBPackage
COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ ${test_build_verbose}
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateCMBPackage PROPERTIES
LABELS "CMB"
TIMEOUT 1200)
# Install all ParaView's shared libraries.
install(
DIRECTORY "${install_location}/lib/paraview-${pv_version}"
DESTINATION "lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
# Install all cmb's shared libraries.
install(
DIRECTORY "${install_location}/lib/cmb-${cmb_version}"
DESTINATION "lib"
USE_SOURCE_PERMISSIONS
COMPONENT superbuild)
# Get the right version of paraview projects
foreach (prog IN LISTS cmb_programs_to_install)
if (prog STREQUAL "paraview")
set(programs_path ${install_location}/lib/paraview-${pv_version}/${prog})
else ()
set(programs_path ${install_location}/lib/cmb-${cmb_version}/${prog})
endif ()
install(CODE
"execute_process(COMMAND
${CMAKE_COMMAND}
-Dexecutable:PATH=${programs_path}
-Ddependencies_root:PATH=${install_location}
-Dpv_libraries_root:PATH=${install_location}/lib/paraview-${pv_version}
-Dcmb_libraries_root:PATH=${install_location}/lib/cmb-${cmb_version}
-Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib/paraview-${pv_version}
-P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)"
COMPONENT superbuild)
endforeach ()
# Install qt
if (qt_ENABLED AND NOT USE_SYSTEM_qt)
install(
# Install all qt plugins (including sqlite).
# FIXME: We can reconfigure Qt to be built with inbuilt sqllite support to
# avoid the need for plugins.
DIRECTORY "${install_location}/plugins/"
DESTINATION "bin"
COMPONENT superbuild
PATTERN "*.a" EXCLUDE
PATTERN "paraview-${pv_version}" EXCLUDE
PATTERN "${program}-${cmb_version}" EXCLUDE
PATTERN "fontconfig" EXCLUDE
PATTERN "*.jar" EXCLUDE
PATTERN "*.debug.*" EXCLUDE
PATTERN "libboost*" EXCLUDE)
endif()
# install executables
set(executables pvserver pvdataserver pvrenderserver)
if (python_ENABLED)
list(APPEND executables
pvbatch pvpython)
# we are not building pvblot for now. Disable it.
# set (executables ${executables} pvblot)
endif ()
if (qt_ENABLED)
list(APPEND executables
paraview)
endif ()
foreach (executable IN LISTS executables cmb_programs_to_install)
install(PROGRAMS "${install_location}/bin/${executable}"
DESTINATION "bin"
COMPONENT superbuild)
endforeach ()
if (cmbworkflows_ENABLED)
install(
DIRECTORY "${install_location}/share/workflows/"
DESTINATION "share/workflows/"
COMPONENT superbuild)
endif ()
include(modelbuilder.bundle.common)
include(cmb.bundle.unix)
# script to "bundle" cmb.
#------------------------------------------------------------------------------
# include common stuff.
include(cmb.bundle.common)
set(CPACK_MONOLITHIC_INSTALL TRUE)
# set NSIS install specific stuff.
# URL to website providing assistance in installing your application.
set (CPACK_NSIS_HELP_LINK "http://paraview.org/Wiki/ParaView")
set (CPACK_NSIS_MENU_LINKS
......@@ -127,7 +119,6 @@ if (mpi_ENABLED AND NOT USE_SYSTEM_mpi)
USE_SOURCE_PERMISSIONS
COMPONENT ParaView)
endif()
#-----------------------------------------------------------------------------
if (cmbworkflows_ENABLED)
install(
......@@ -135,28 +126,3 @@ if (cmbworkflows_ENABLED)
DESTINATION "share/workflows/"
COMPONENT superbuild)
endif ()
# install system runtimes.
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
include(InstallRequiredSystemLibraries)
#-----------------------------------------------------------------------------
# include CPack at end so that all COMPONENTs specified in install rules are
# correctly detected.
include(CPack)
add_test(NAME GenerateCMBPackage-NSIS
COMMAND ${CMAKE_CPACK_COMMAND} -G NSIS ${test_build_verbose}
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
add_test(NAME GenerateCMBPackage-ZIP
COMMAND ${CMAKE_CPACK_COMMAND} -G ZIP ${test_build_verbose}
WORKING_DIRECTORY ${SuperBuild_BINARY_DIR})
set_tests_properties(GenerateCMBPackage-NSIS
GenerateCMBPackage-ZIP
PROPERTIES
# needed so that tests are run on typical paraview
# dashboards
LABELS "CMB"
TIMEOUT 1200) # increase timeout to 20 mins.
include(modelbuilder.bundle.common)
include(cmb.bundle.windows)
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