1 #! \brief Install external CTK plug-ins. 3 #! Use this macro to call mitkFunctionInstallCTKPlugin() for all known 4 #! or given external CTK plug-ins. The arguments given until a known argument name 5 #! are treated as plug-in target names. If none are given, all known 6 #! external plug-ins will be installed. 8 #! This macro supports multiple MacOSX Bundles by checking the variable 9 #! MACOSX_BUNDLE_NAMES. If it exists, each plug-in will be installed 10 #! in each given bundle (under <bundle_name>/Contents/MacOS/plugins), otherwise 11 #! it will be installed in "bin/plugins". 13 #! Typical usage (will install all known external plug-ins): 15 #! FunctionInstallThirdPartyCTKPlugins() 18 #! To install only the org.commontk.eventadmin plug-in for example, call: 20 #! FunctionInstallThirdPartyCTKPlugins(org.commontk.eventadmin) 23 #! \note If you provide specific plug-in names as arguments, you must 24 #! make sure that your list includes the transitive closure of all plug-in 25 #! dependencies. Use the ctkFunctionGetPluginDependencies() macro to obtain 26 #! all dependencies of a specified set of plug-ins. 30 cmake_parse_arguments(_INSTALL
"" "" "EXCLUDE" ${ARGN})
32 set(install_directories
"")
33 if(NOT MACOSX_BUNDLE_NAMES)
34 set(install_directories bin/plugins)
36 foreach(bundle_name ${MACOSX_BUNDLE_NAMES})
37 list(APPEND install_directories ${bundle_name}.app/Contents/MacOS/plugins)
38 endforeach(bundle_name)
39 endif(NOT MACOSX_BUNDLE_NAMES)
41 if(_INSTALL_DEFAULT_ARGS)
43 foreach(_ctk_plugin ${_INSTALL_DEFAULT_ARGS})
44 string(REPLACE
"." "_" _plugin_target ${_ctk_plugin})
45 list(APPEND _ctk_plugins ${_ctk_plugin})
48 ctkFunctionGetAllPluginTargets(_ctk_plugins)
53 foreach(_exclude ${_INSTALL_EXCLUDE})
54 string(REPLACE
"." "_" _exclude_target ${_exclude})
55 list(APPEND _exclude_list ${_exclude_target})
57 list(REMOVE_ITEM _ctk_plugins ${_INSTALL_EXCLUDE})
60 ctkMacroGetAllNonProjectTargetLibraries("${_ctk_plugins}
" _third_party_ctk_plugins) 61 if(_third_party_ctk_plugins) 62 foreach(install_subdir ${install_directories}) 63 mitkFunctionInstallCTKPlugin(TARGETS ${_third_party_ctk_plugins} 64 DESTINATION "${install_subdir}
") mitkFunctionInstallThirdPartyCTKPlugins()
Install external CTK plug-ins.