Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
CMB-SuperBuild
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
T.J. Corona
CMB-SuperBuild
Commits
c22450ee
Commit
c22450ee
authored
Jun 22, 2016
by
Ben Boeckel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugins: install .plugins file on a per-app basis
parent
5322a851
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
58 deletions
+71
-58
projects/apple/cmb.bundle.apple.cmake
projects/apple/cmb.bundle.apple.cmake
+23
-5
projects/cmb.bundle.common.cmake
projects/cmb.bundle.common.cmake
+28
-5
projects/hydrology.bundle.common.cmake
projects/hydrology.bundle.common.cmake
+0
-17
projects/modelbuilder.bundle.common.cmake
projects/modelbuilder.bundle.common.cmake
+0
-26
projects/unix/cmb.bundle.unix.cmake
projects/unix/cmb.bundle.unix.cmake
+10
-2
projects/win32/cmb.bundle.windows.cmake
projects/win32/cmb.bundle.windows.cmake
+10
-3
No files found.
projects/apple/cmb.bundle.apple.cmake
View file @
c22450ee
set
(
cmb_plugins
)
foreach
(
cmb_plugin IN LISTS cmb_plugins_
to_inst
all
)
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
()
...
...
@@ -9,6 +11,8 @@ foreach (cmb_plugin IN LISTS cmb_plugins_to_install)
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
()
...
...
@@ -18,18 +22,28 @@ endforeach ()
set
(
python_modules
)
if
(
pythongirderclient_enabled
)
list
(
APPEND python_modules
six
requests
girder_client
)
endif
()
foreach
(
program IN LISTS cmb_programs_to_install
)
set
(
plugins
"
${
cmb_plugins_
${
program
}}
"
)
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
()
superbuild_apple_create_app
(
"
\$
{CMAKE_INSTALL_PREFIX}/
${
cmb_package
}
"
"
${
program
}
.app"
"
${
superbuild_install_location
}
/Applications/
${
program
}
.app/Contents/MacOS/
${
program
}
"
CLEAN
PLUGINS
${
cmb_plugin
s
}
PLUGINS
${
plugin_path
s
}
SEARCH_DIRECTORIES
"
${
superbuild_install_location
}
/lib"
)
foreach
(
icon_filename MacIcon.icns pvIcon.icns
)
...
...
@@ -60,10 +74,14 @@ foreach(program IN LISTS cmb_programs_to_install)
file(WRITE
\"\$
{CMAKE_INSTALL_PREFIX}/
${
cmb_package
}
/
${
program
}
.app/Contents/Resources/qt.conf
\"
\"\"
)"
COMPONENT superbuild
)
set
(
plugins_file
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
program
}
.plugins"
)
cmb_add_plugin
(
"
${
plugins_file
}
"
${
plugins
}
)
install
(
FILES
"
${
cmb_
plugins_file
}
"
FILES
"
${
plugins_file
}
"
DESTINATION
"
${
cmb_package
}
/
${
program
}
.app/Contents/Plugins"
COMPONENT superbuild
)
COMPONENT superbuild
RENAME
".plugins"
)
superbuild_apple_install_python
(
"
\$
{CMAKE_INSTALL_PREFIX}/
${
cmb_package
}
"
...
...
projects/cmb.bundle.common.cmake
View file @
c22450ee
...
...
@@ -37,11 +37,8 @@ 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
)
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
"
)
string
(
REPLACE
"</Plugins>"
"
${
plugin_directive
}
</Plugins>"
contents
"
${
contents
}
"
)
...
...
@@ -61,3 +58,29 @@ if (cmb_install_paraview_python)
pvbatch
pvpython
)
endif
()
set
(
cmb_plugins_smtk
smtkDiscreteSessionPlugin
smtkExodusSessionPlugin
smtkPolygonSessionPlugin
smtkRemoteSessionPlugin
smtkRemusMeshOperatorPlugin
)
if
(
cgm_enabled
)
list
(
APPEND cmb_plugins_smtk
smtkCGMSessionPlugin
)
endif
()
set
(
cmb_plugins_cmb
CMB_Plugin
ModelBridge_Plugin
)
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
CMB_Plugin
)
projects/hydrology.bundle.common.cmake
View file @
c22450ee
...
...
@@ -15,20 +15,3 @@ set(cmb_install_paraview_server TRUE)
set
(
cmb_install_paraview_python TRUE
)
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
}
)
projects/modelbuilder.bundle.common.cmake
View file @
c22450ee
...
...
@@ -10,29 +10,3 @@ set(cmb_install_paraview_server FALSE)
set
(
cmb_install_paraview_python TRUE
)
include
(
cmb.bundle.common
)
set
(
cmb_plugins
smtkDiscreteSessionPlugin
smtkExodusSessionPlugin
smtkPolygonSessionPlugin
smtkRemoteSessionPlugin
smtkRemusMeshOperatorPlugin
CMB_Plugin
ModelBridge_Plugin
)
if
(
cgm_enabled
)
list
(
APPEND cmb_plugins
smtkCGMSessionPlugin
)
endif
()
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
}
)
list
(
REMOVE_ITEM cmb_plugins_to_install
CMB_Plugin
ModelBridge_Plugin
)
projects/unix/cmb.bundle.unix.cmake
View file @
c22450ee
set
(
plugins
)
foreach
(
executable IN LISTS paraview_executables cmb_programs_to_install
)
superbuild_unix_install_program
(
"
${
executable
}
"
"paraview-
${
paraview_version
}
;cmb-
${
cmb_version
}
"
)
list
(
APPEND plugins
${
cmb_plugins_
${
executable
}}
)
endforeach
()
foreach
(
plugin IN LISTS cmb_plugins_to_install
)
list
(
REMOVE_DUPLICATES plugins
)
foreach
(
plugin IN LISTS plugins
)
superbuild_unix_install_plugin
(
"lib
${
plugin
}
.so"
"cmb-
${
cmb_version
}
"
";paraview-
${
paraview_version
}
;cmb-
${
cmb_version
}
"
...
...
@@ -44,8 +49,11 @@ endif ()
include
(
python.functions
)
superbuild_install_superbuild_python
()
set
(
plugins_file
"
${
CMAKE_CURRENT_BINARY_DIR
}
/.plugins"
)
cmb_add_plugin
(
"
${
plugins_file
}
"
${
plugins
}
)
install
(
FILES
"
${
cmb_
plugins_file
}
"
FILES
"
${
plugins_file
}
"
DESTINATION
"bin"
COMPONENT superbuild
)
...
...
projects/win32/cmb.bundle.windows.cmake
View file @
c22450ee
...
...
@@ -20,6 +20,7 @@ if (USE_SYSTEM_qt4)
"
${
QT_LIBRARY_DIR
}
"
)
endif
()
set
(
plugins
)
foreach
(
executable IN LISTS paraview_executables cmb_programs_to_install
)
if
(
DEFINED
"
${
executable
}
_description"
)
list
(
APPEND CPACK_NSIS_MENU_LINKS
...
...
@@ -30,9 +31,13 @@ foreach (executable IN LISTS paraview_executables cmb_programs_to_install)
superbuild_windows_install_program
(
"
${
executable
}
"
"
${
library_paths
}
"
)
list
(
APPEND plugins
${
cmb_plugins_
${
executable
}}
)
endforeach
()
foreach
(
plugin IN LISTS cmb_plugins_to_install
)
list
(
REMOVE_DUPLICATES plugins
)
foreach
(
plugin IN LISTS plugins
)
superbuild_windows_install_plugin
(
"
${
plugin
}
.dll"
"bin"
"
${
library_paths
}
"
)
...
...
@@ -83,9 +88,11 @@ if (pythonrequests_enabled)
COMPONENT superbuild
)
endif
()
# install the .plugins file
set
(
plugins_file
"
${
CMAKE_CURRENT_BINARY_DIR
}
/.plugins"
)
cmb_add_plugin
(
"
${
plugins_file
}
"
${
plugins
}
)
install
(
FILES
"
${
cmb_
plugins_file
}
"
FILES
"
${
plugins_file
}
"
DESTINATION
"bin"
COMPONENT superbuild
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment