cmb.bundle.common.cmake 2.91 KB
Newer Older
Ben Boeckel's avatar
Ben Boeckel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# 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)

40
41
function (cmb_add_plugin output)
  set(contents "<?xml version=\"1.0\"?>\n<Plugins>\n</Plugins>\n")
Ben Boeckel's avatar
Ben Boeckel committed
42
43
44
45
46
47
  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 ()
48
49
50
51
52
53
54
55
56
57
58
59
60

set(paraview_executables)
if (cmb_install_paraview_server)
  list(APPEND paraview_executables
    pvserver
    pvdataserver
    pvrenderserver)
endif ()
if (cmb_install_paraview_python)
  list(APPEND paraview_executables
    pvbatch
    pvpython)
endif ()
61
62
63
64
65
66

set(cmb_plugins_smtk
  smtkDiscreteSessionPlugin
  smtkExodusSessionPlugin
  smtkPolygonSessionPlugin
  smtkRemoteSessionPlugin
67
68
69
  smtkRemusMeshOperatorPlugin
  smtkOpenCVPlugin
  smtkDelaunayPlugin)
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

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)
89
90
91
92
93

set(cmb_python_modules
  smtk
  shiboken
  paraview
94
  cinema_python
95
96
97
98
99
100
101
102
103
104
105
106
107
108
  pygments
  six
  vtk)

if (numpy_enabled)
  list(APPEND cmb_python_modules
    numpy)
endif ()

if (pythongirderclient_enabled)
  list(APPEND cmb_python_modules
    requests
    girder_client)
endif ()
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123

if (paraviewweb_enabled)
  list(APPEND python_modules
    autobahn
    twisted
    zope)

  if (WIN32)
    list(APPEND python_modules
      adodbapi
      isapi
      pythoncom
      win32com)
  endif ()
endif ()