Commit a9ebd32b authored by David Thompson's avatar David Thompson

A new cmb6 branded app.

+ This application uses the "Clone2" ParaView example.
+ The "File" menu is organized for the first stage of CMB 6, which
  is to serve as a model viewer.
+ Change some behavior settings so the SMTK plugins are loaded properly.
+ Some XML tests of the viewer functionality are included.
+ The modelbuilder app allows fancy side-by-side panel docking by
  enabling nested docking.
+ A plugin exists to enable post-processing via a toolbar button.
  modelbuilder-based applications may load it for advanced users.
parents
Pipeline #89372 failed with stage
in 0 seconds
---
# This configuration requires clang-format 3.8 or higher.
BasedOnStyle: Mozilla
AlignAfterOpenBracket: DontAlign
AlignOperands: false
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
BreakBeforeBraces: Allman
ColumnLimit: 100
Standard: Cpp03
# This requires clang-format 4.0 (at least).
#FixNamespaceComments: true
ReflowComments: false
...
.git* export-ignore
*.sh crlf=input
# Attributes used for formatting.
[attr]our-c-style whitespace=tab-in-indent format.clang-format
[attr]our-py-style whitespace=tab-in-indent format.autopep8
*.cxx our-c-style
*.h our-c-style
*.hxx our-c-style
*.txx our-c-style
*.py our-py-style
*.txt whitespace=tab-in-indent
*.cmake whitespace=tab-in-indent
[attr]lfs filter=lfs diff=lfs merge=lfs -text
data/** lfs
*.pyc
*.swp
[submodule "data/simulation-workflows"]
path = data/simulation-workflows
url = https://gitlab.kitware.com/cmb/simulation-workflows.git
[submodule "thirdparty/smtk"]
path = thirdparty/smtk
url = https://gitlab.kitware.com/cmb/smtk.git
# Loaded by .git/hooks/(pre-commit|commit-msg|prepare-commit-msg)
# during git commit after local hooks have been installed.
[hooks "chain"]
pre-push = Utilities/git/pre-push
# This file is used by 'git shortlog' to provide unique author names (see 'man
# git-shortlog' for documentation of the syntax).
Robert O'Bara <bob.obara@kitware.com> Bob Obara <bob.obara@kitware.com>
Ben Boeckel <ben.boeckel@kitware.com> Ben Boeckel <mathstuf@gmail.com>
python:
version: 2.7
requirements_file: Documentation/requirements/dev.txt
cmake_minimum_required(VERSION 3.9.0)
#if(POLICY CMP0025)
# #setup policy rules for CMake 3.0 while we have a minimum required of 2.8.X
# #both 42 and 25 were introduced in the same cmake version
# cmake_policy(SET CMP0025 NEW) # Clang is now Clang and Apple Clang
# cmake_policy(SET CMP0042 OLD) # Disable @rpath on Apple
#endif()
#If the user/superbuild hasn't explicitly stated what c++ standard to use
#require C++11
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS FALSE)
endif()
project(cmb)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
option(cmb_enable_testing "Build CMB Testing" ON)
if (cmb_enable_testing)
enable_testing()
include(CTest)
set(cmb_test_dir ${cmb_BINARY_DIR}/testing/temporary)
make_directory(${cmb_test_dir})
unset(cmb_data_dir CACHE)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/data/cmb-data" cdata)
if (NOT cdata STREQUAL "\n")
message(WARNING
"Testing is enabled, but CMB's data is not available. Use git-lfs in order "
"to obtain the testing data.")
set(cmb_data_dir)
else ()
set(cmb_data_dir "${CMAKE_CURRENT_SOURCE_DIR}/data")
endif ()
unset(smtk_data_dir CACHE)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/smtk/data/smtk-data" sdata)
if (NOT sdata STREQUAL "\n")
message(WARNING
"Testing is enabled, but SMTK's data is not available. Use git-lfs in order "
"to obtain the testing data.")
set(smtk_data_dir)
else ()
set(smtk_data_dir "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/smtk/data")
endif ()
#add the first test which is for checking the copyright
add_test(NAME cmb-copyright-check
COMMAND ${CMAKE_COMMAND}
-D "cmb_SOURCE_DIR=${cmb_SOURCE_DIR}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/cmake/CheckCopyright.cmake"
)
set_tests_properties(cmb-copyright-check
PROPERTIES LABELS "cmb;swprocess"
)
endif()
# Fetch CMB version from version.txt and set up install/output directories:
include(CMBInstallRules)
# Add options for performing code coverage tests:
include(CMBCoverage)
# Do not report some warnings from generated code to the dashboard:
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/CTestCustom.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake")
find_package(ParaView COMPONENTS vtkIOGDAL REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
include(${PARAVIEW_USE_FILE})
set(cmb_plugin_paths
"${cmb_plugin_paths}"
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
CACHE STRING "Semi-colon separated paths for testing plugins."
)
mark_as_advanced(cmb_plugin_paths)
add_subdirectory(thirdparty)
add_subdirectory(plugins) # Plugins must be built before the app so .plugins file will be correct.
add_subdirectory(modelbuilder)
option(cmb_enable_documentation "Include targets Sphinx-generated documentation" OFF)
if (cmb_enable_documentation)
find_package(Sphinx)
add_subdirectory(doc)
endif()
Contributing to CMB
========================
This page documents at a very high level how to contribute to CMB.
Please check our [developer instructions][] for a more detailed guide to
developing and contributing to the project, and our [CMB Git README][]
for additional information.
The CMB development cycle is built upon the following components:
1. [Issues][] identify any issues including bugs and feature requests. In
general, every code change should have an associated issue which identifies
the bug being fixed or the feature being added.
2. [Merge Requests][] are collections of changes that address issues.
3. [Labels][] are labels or tags that can be added and removed to/from issues
and/or merge requests to annotate them including indicating their state in
the development cycle. See [Labels Glossary][].
4. [Milestones][] refer to development milestones such as numbered public
releases, or named internal releases.
Reporting Issues
================
If you have a bug report or a feature request for CMB, you can use the
[issues][] tracker to report a [new issue][].
To report an issue.
1. Register for an account on [our GitLab instance][GitLab Access] and select a user name.
2. Create a [new issue][].
3. Ensure that the issue has a **Title** and **Description**
with enough details for someone from the development team to reproduce the
issue. See [Gitlab Markdown] guide for styling the **Description**. Include
screenshots and sample datasets whenever possible. Typically, reporter
**should not** set any other fields for the issue, including
**Assignee**, **Milestone**, or **Labels**. These get set by members of the
development team.
4. If developers need more information on an issue, they will add the
`triage:needinfo` label as add a comment for the reporter soliciting more
information. Once the reporter has provided the necessary information, he or she
should remove the `triage:needinfo` label from the issue to notify the
development team.
When a developer starts working on an issue, the developer will add the
`workflow:active-development` label. Once the development is complete and the issue
resolved, the issue will be closed, and the `workflow:active-development` label
will be replaced by `workflow:customer-review`. At that point, the reporter can
checkout the latest `master` and confirm that the issue has been addressed. If so,
the reporter can remove the `workflow:customer-review` label. If the issue was not
addressed then the reporter should reopen the issue or solicit more information
from the developer by adding the `triage:needinfo` label.
To keep the number of open issues manageable, we will periodically expire old issues
with no activity. Such issues will be closed and tagged with the label
`triage:expired`. Such issues can be reopened if needed.
Notes for Project Managers
--------------------------
For every issue, project managers can assign:
1. **Milestone** to indicate which release this issue fix is planned for.
2. `priority:...` label to indicate how critical is this issue for the specific
milestone, ranging from `priority:required`, `priority:important`,
`priority:nice-to-have`, and `priority:low`. Only one priority label makes
sense at a time.
Notes for Developers
--------------------
For every issue, developers can assign:
1. `area:...` labels to indicate which area this issue relates to in terms of the software process e.g. `area:build`,
`area:doc`, etc.
2. `app:...` label to indicate which application is effected by this issue. An issue
may have multiple apps associated with it (or use `app:framework` to indicate this is a general issue effecting all CMB applications.
3. `triage:...` labels to indicate issue triage status. `triage:confirmed` is added
when the issue has been confirmed. `triage:easy` is added for issues that are
easy to fix. `triage:feature` is added to issues that are new feature requests.
`triage:needinfo` is added to solicit more information from the reporter.
4. `triage:needinfo` label on closed issues means the reporter or reviewer is
requesting more information from the developer before the fix can be reviewed.
Please provide such information and then remove the label.
5. `workflow:active-development` label should be added to issues under development.
Fixing Issues
=============
Typically, one addresses issues by writing code. To start contributing to CMB:
1. Register for an account on [our GitLab instance][GitLab Access] and select a user name.
2. [Fork CMB][] into your user's namespace on GitLab.
3. Create a local clone of the main CMB repository. Optionally configure
Git to [use SSH instead of HTTPS][].
Then clone:
$ git clone --recursive https://gitlab.kitware.com/cmb/cmb.git CMB
$ cd CMB
The main repository will be configured as your `origin` remote.
For more information see: [Setup][] and [download instructions][]
4. Run the [developer setup script][] to prepare your CMB work
tree and create Git command aliases used below:
$ ./Utilities/SetupForDevelopment.sh
This will prompt for your GitLab user name and configure a remote
called `gitlab` to refer to it.
For more information see: [Setup][]
5. [Build CMB] and run it.
6. Edit files and create commits (repeat as needed):
$ edit file1 file2 file3
$ git add file1 file2 file3
$ git commit
Commit messages must be thorough and informative so that
reviewers will have a good understanding of why the change is
needed before looking at the code. Appropriately refer to the issue
number, if applicable.
For more information see: [Create a Topic][]
7. Push commits in your topic branch to your fork in GitLab:
$ git gitlab-push
For more information see: [Share a Topic][]
8. Run tests with ctest, or use the dashboard
9. Visit your fork in GitLab, browse to the "**Merge Requests**" link on the
left, and use the "**New Merge Request**" button in the upper right to
create a Merge Request.
For more information see: [Create a Merge Request][]
8. Follow the [review][] process to get your merge request reviewed and tested.
On success, the merge-request can be merged and closed.
For more information see: [Review a Merge Request][]
9. When a merge request is closed, any related issue should be closed (if not
closed automatically) and assigned the `workflow:customer-review` label to
request a review from the reporter.
10. Monitor the related issue for any `triage:needinfo` label additions to provide
the customer with any details necessary to test the fix.
Our [wiki][] is used to document features, flesh out designs and host other
documentation. We have several [mailing lists][] to coordinate development and
to provide support.
[CMB Git README]: Documentation/dev/README.md
[developer instructions]: Documentation/dev/develop.md
[GitLab Access]: https://gitlab.kitware.com/users/sign_in
[Fork CMB]: https://gitlab.kitware.com/cmb/cmb/forks/new
[use SSH instead of HTTPS]: Documentation/dev/download.md#use-ssh-instead-of-https
[download instructions]: Documentation/dev/download.md#clone
[developer setup script]: Utilities/SetupForDevelopment.sh
[Setup]: Documentation/dev/develop.md#Setup
[Build CMB]: https://gitlab.kitware.com/cmb/cmb-superbuild/
[Create a Topic]: Documentation/dev/develop.md#create-a-topic
[Share a Topic]: Documentation/dev/develop.md#share-a-topic
[Create a Merge Request]: Documentation/dev/develop.md#create-a-merge-request
[Review a Merge Request]: Documentation/dev/develop.md#review-a-merge-request
[review]: Documentation/dev/develop.md#review-a-merge-request
[Issues]: https://gitlab.kitware.com/cmb/cmb/issues
[Merge Requests]: https://gitlab.kitware.com/cmb/cmb/merge_requests
[Labels]: https://gitlab.kitware.com/cmb/cmb/labels
[Milestones]: https://gitlab.kitware.com/cmb/cmb/milestones
[Wiki]: https://gitlab.kitware.com/cmb/cmb/wikis/pages
[Mailing Lists]: http://www.computationalmodelbuilder.org/mailinglist/
[Gitlab Markdown]: https://gitlab.kitware.com/help/user/markdown.md
[new issue]: https://gitlab.kitware.com/cmb/cmb/issues/new
[Labels Glossary]: Documentation/dev/labels.md
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "SuperBuild-ConceptualModelBuilder")
set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "open.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=CMB")
set(CTEST_DROP_SITE_CDASH TRUE)
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude Omicron from coverage
"Omicron"
"vtk[^\\.]+ClientServer.cxx"
"moc_[^\\.]+.cxx"
"ui_[^\\.]+.h"
"qrc_[^\\.]+.cxx"
"pybind11"
"smtk/thirdparty"
"Testing"
"testing"
)
set(CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
"tl_debug.*has no symbols"
)
Computational Model Builder (CMB) License Version 1.0
========================================================================
Copyright (c) 2012 Kitware Inc. 28 Corporate Drive
Clifton Park, NY, 12065, USA.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Kitware nor the names of any contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The following files and directories under the Source directory come from third parties. Check the
contents of these for details on the specifics of their respective
licenses.
- - - - - - - - - - - - - - - - - - - - - - - - do not remove this line
no exceptions
![CMB](Documentation/images/cmb_logo.png)
Introduction
============
[Computational Model Builder (CMB)][CMB] is an open-source, multi-platform simulation workflow framework based on [ParaView][],
[Visualization Toolkit (VTK)][VTK] and [Qt][].
The project
has grown through collaborative efforts between [Kitware Inc.][Kitware],
and various other
government and commercial institutions, and acedemic partners.
[CMB]: http://www.ComputationalModelBuilder.org
[ParaView]: http://www.paraview.org
[QT]: https://www.qt.io
[VTK]: http://www.vtk.org
[Kitware]: http://www.kitware.com
Learning Resources
==================
* General information is available at the [CMB Homepage][].
* Documentation is available [online][Documentation].
* Community discussion takes place on the [CMB Mailing Lists][].
* Commercial [support][Kitware Support] and [training][Kitware Training]
are available from [Kitware][].
[CMB Homepage]: http://www.ComputationalModelBuilder.org
[Documentation]: http://www.computationalmodelbuilder.org/documentation/
[CMB Mailing Lists]: http://www.computationalmodelbuilder.org/mailinglist/
[Kitware]: http://www.kitware.com/
[Kitware Support]: http://www.kitware.com/products/support.html
[Kitware Training]: http://www.kitware.com/products/protraining.php
Reporting Bugs
==============
If you have found a bug:
1. If you have a patch, please read the [CONTRIBUTING.md][] document.
2. Otherwise, please join the one of the [CMB Mailing Lists][] and ask
about the expected and observed behaviors to determine if it is
really a bug.
3. Finally, if the issue is not resolved by the above steps, open
an entry in the [CMB Issue Tracker][].
[CMB Issue Tracker]: https://gitlab.kitware.com/cmb/cmb/issues
Contributing
============
See [CONTRIBUTING.md][] for instructions to contribute.
[CONTRIBUTING.md]: CONTRIBUTING.md
License
=======
CMB is distributed under the OSI-approved BSD 3-clause License.
See [License.txt][] for details.
[License.txt]: LICENSE.txt
#=========================================================================
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the above copyright notice for more information.
#
#=========================================================================
# This code has been adapted from remus (https://gitlab.kitware.com/cmb/remus)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_COMPILER_IS_CLANGXX 1)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
include(CheckCXXCompilerFlag)
#Add option for enabling gcov coverage
option(cmb_enable_coverage "Build with gcov support." OFF)
mark_as_advanced(cmb_enable_coverage)
if(cmb_enable_coverage)
#We're setting the CXX flags and C flags beacuse they're propagated down
#independent of build type.
if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage -fno-elide-constructors -fprofile-instr-generate -fcoverage-mapping")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage -fprofile-instr-generate -fcoverage-mapping")
endif()
endif()
endif()
# This is a helper module that can be used to package an APP for MacOSX. It is
# not designed to bring in all *external* dependencies. It's meant to package
# 'what is built'.
if (NOT APPLE)
return()
endif()
# Download PDF documentation. These are used in ModelBuilder's help menu.
macro(download_pdf_guides)
set (cmb_pdf_doc_dir "${CMAKE_BINARY_DIR}/downloads/pdf-doc")
file(DOWNLOAD "https://media.readthedocs.org/pdf/cmb/master/cmb.pdf"
"${cmb_pdf_doc_dir}/CMBUsersGuide.pdf"
INACTIVITY_TIMEOUT 10
SHOW_PROGRESS)
file(DOWNLOAD "https://media.readthedocs.org/pdf/smtk/latest/smtk.pdf"
"${cmb_pdf_doc_dir}/SMTKUsersGuide.pdf"
INACTIVITY_TIMEOUT 10
SHOW_PROGRESS)
endmacro()
# cleanup_bundle is called to fillup the .app file with libraries and plugins
# built. This does not package any external libraries, only those that are
# at the specified locations. This will create a workable bundle that works on
# the machine where its built (since it relies on other shared frameworks and
# libraries) e.g. python
macro(cleanup_bundle app app_root libdir)
# Install PDF documentation
download_pdf_guides()
file(GLOB guides "${cmb_pdf_doc_dir}/*")
foreach(guide IN LISTS guides)
if(EXISTS "${guide}" AND NOT IS_DIRECTORY "${guide}")
file(INSTALL "${guide}"
DESTINATION "${app_root}/Contents/doc"
USE_SOURCE_PERMISSIONS)
endif()
endforeach()
# take all libs from ${ARGN} and put it in the Libraries dir.
file(GLOB_RECURSE dylibs ${libdir}/*.dylib)
file(GLOB_RECURSE solibs ${libdir}/*.so)
# third party libs are installed using the CMAKE_INSTALL_PREFIX. Let's include
# them too.
file(GLOB_RECURSE thirdparty_dylibs ${CMAKE_INSTALL_PREFIX}/lib/*.dylib)
file(GLOB_RECURSE thirdparty_solibs ${CMAKE_INSTALL_PREFIX}/lib/*.so)
list(APPEND dylibs ${thirdparty_dylibs})
list(APPEND solibs ${thirdparty_solibs})
list(REMOVE_DUPLICATES dylibs)
list(REMOVE_DUPLICATES solibs)
# We need to create the plugins directory before we symlink our plugins into
# it.
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${app_root}/Contents/MacOS/plugins)
# some of the .dylibs are actually plugins. These need to be installed in the
# plugins directory so they are automatically found by the app. We also adjust
# their id to reflect this change.
foreach(lib IN LISTS dylibs)
# We assume that all plugins match the pattern "###Plugin.dylib". Plugins
# are put in the Libraries directory and symlinked to the plugins directory
# so the plugin manager can find them.
if (${lib} MATCHES "Plugin.dylib")
file(INSTALL ${lib}
DESTINATION ${app_root}/Contents/Libraries
USE_SOURCE_PERMISSIONS)
get_filename_component(libname ${lib} NAME)
execute_process(COMMAND install_name_tool -id
@executable_path/../Libraries/${libname}
${app_root}/Contents/Libraries/${libname})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${app_root}/Contents/Libraries/${libname}
${app_root}/Contents/MacOS/plugins/${libname})
else ()
file(INSTALL ${lib}
DESTINATION ${app_root}/Contents/Libraries
USE_SOURCE_PERMISSIONS)
endif ()
endforeach ()
file(INSTALL ${solibs}
DESTINATION ${app_root}/Contents/Libraries
USE_SOURCE_PERMISSIONS)
file(GLOB pyfiles ${libdir}/*.py)
file(GLOB pycfiles ${libdir}/*.pyc)
if (pycfiles OR pyfiles)
file(INSTALL ${pyfiles} ${pycfiles}
DESTINATION ${app_root}/Contents/Python
USE_SOURCE_PERMISSIONS)
endif()
# HACK: this refers to "paraview" directly. Not a good idea.
set (python_packages_dir "${libdir}/site-packages/paraview")
if (EXISTS "${python_packages_dir}")
file(INSTALL DESTINATION ${app_root}/Contents/Python
TYPE DIRECTORY FILES "${python_packages_dir}"
USE_SOURCE_PERMISSIONS)
endif()
# package other executables such as pvserver.
get_filename_component(bin_dir "${app_root}" PATH)
file(GLOB executables "${bin_dir}/*")
foreach(exe IN LISTS executables)
if (EXISTS "${exe}" AND NOT IS_DIRECTORY "${exe}")
file(INSTALL "${exe}"
DESTINATION "${app_root}/Contents/bin"
USE_SOURCE_PERMISSIONS)
endif()
endforeach()
endmacro()
# Setup install directories (we use names with VTK_ prefix, since ParaView now
# is built as a custom "VTK" library.
include(CMBVersion)
# Use the new version of the variable names for output of build process.
# These are consistent with what VTK sets.
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
#we need to explicitly set these so that paraview's plugin bad values
#aren't kept
set(VTK_INSTALL_RUNTIME_DIR bin)
set(VTK_INSTALL_LIBRARY_DIR lib)
set(VTK_INSTALL_ARCHIVE_DIR lib)
set(VTK_INSTALL_INCLUDE_DIR include/cmb-${cmb_version})
if(NOT VTK_INSTALL_DATA_DIR)
set(VTK_INSTALL_DATA_DIR share/cmb-${cmb_version})
endif()
if(NOT VTK_INSTALL_DOC_DIR)
set(VTK_INSTALL_DOC_DIR share/doc/cmb-${cmb_version})
endif()
if(NOT VTK_INSTALL_PACKAGE_DIR)
set(VTK_INSTALL_PACKAGE_DIR "lib/cmake/cmb-${cmb_version}")
endif()
if(NOT VTK_INSTALL_EXPORT_NAME)
set(VTK_INSTALL_EXPORT_NAME CMBTargets)
endif()
if(NOT PARAVIEW_INSTALL_PLUGINS_DIR)
if(WIN32)
set (PARAVIEW_INSTALL_PLUGINS_DIR ${VTK_INSTALL_RUNTIME_DIR})
else ()
set (PARAVIEW_INSTALL_PLUGINS_DIR ${VTK_INSTALL_LIBRARY_DIR})
endif()
endif()
#set (VTK_INSTALL_NO_LIBRARIES TRUE)
#set (VTK_INSTALL_NO_DEVELOPMENT TRUE)
# Disable installing of the Qt Designer plugin. There's no need for it in
# ParaView install rules.
set (VTK_INSTALL_NO_QT_PLUGIN TRUE)
# ParaView install the vtk python modules specifically to appropriate locations.
set (VTK_INSTALL_NO_PYTHON TRUE)
set (VTK_INSTALL_PYTHON_USING_CMAKE TRUE)
# for temporary backwards compatibility.
set (PV_INSTALL_BIN_DIR ${VTK_INSTALL_RUNTIME_DIR})
set (PV_INSTALL_LIB_DIR ${VTK_INSTALL_LIBRARY_DIR})
set (PV_INSTALL_EXPORT_NAME ${VTK_INSTALL_EXPORT_NAME})
# Setting this ensures that "make install" will leave rpaths to external
# libraries (not part of the build-tree e.g. Qt, ffmpeg, etc.) intact on
# "make install". This ensures that one can install a version of ParaView on the
# build machine without any issues. If this not desired, simply specify
# CMAKE_INSTALL_RPATH_USE_LINK_PATH when configuring and
# "make install" will strip all rpaths, which is default behavior.
if (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif ()
if(UNIX)
# When we are building a package on linux we have the problem that the
# libraries are laid out like this:
# - lib/
# - - /paraview-version/
# - - /cmb-version/
# So we need to teach the forwarding executable that builds the plugins
# where to find the paraview libraries, as it will already know where to
# find the cmb libraries
set (pv_version "${PARAVIEW_VERSION_MAJOR}.${PARAVIEW_VERSION_MINOR}")
set(PARAVIEW_INSTALL_LIB_DIR "lib" "../lib/paraview-${pv_version}")
unset(pv_version)
endif()
if (APPLE)
# If building on apple, we will set cmake rules for ParaView such that "make