cmb.bundle.windows.cmake 2.84 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
set(CPACK_MONOLITHIC_INSTALL TRUE)

# URL to website providing assistance in installing your application.
set(CPACK_NSIS_HELP_LINK "https://gitlab.kitware.com/cmb/cmb/wikis/home")

#FIXME: need a pretty icon.
#set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/paraview.ico")

set(ModelBuilder_description "Model Builder")
set(paraview_description "ParaView")
set(pvserver_description "ParaView (server)")
set(pvdataserver_description "ParaView (data server)")
set(pvrenderserver_description "ParaView (render server)")
set(pvpython_description "ParaView (Python shell)")

set(library_paths "lib")

if (USE_SYSTEM_qt4)
  list(APPEND library_paths
    "${QT_LIBRARY_DIR}")
endif ()

23
set(plugins)
Ben Boeckel's avatar
Ben Boeckel committed
24
25
26
27
28
29
30
31
32
33
foreach (executable IN LISTS paraview_executables cmb_programs_to_install)
  if (DEFINED "${executable}_description")
    list(APPEND CPACK_NSIS_MENU_LINKS
      "bin/${executable}.exe" "${${executable}_description}")
  else ()
    message(WARNING "No description for ${executable} given.")
  endif ()

  superbuild_windows_install_program("${executable}"
    "${library_paths}")
34
35
  list(APPEND plugins
    ${cmb_plugins_${executable}})
Ben Boeckel's avatar
Ben Boeckel committed
36
37
endforeach ()

38
39
40
list(REMOVE_DUPLICATES plugins)

foreach (plugin IN LISTS plugins)
41
42
  superbuild_windows_install_plugin("${plugin}.dll"
    "bin"
Ben Boeckel's avatar
Ben Boeckel committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    "${library_paths}")
endforeach ()

set(python_modules)
if (pythongirderclient_enabled)
  list(APPEND python_modules
    requests
    girder_client)
endif ()

superbuild_windows_install_python(
  "${CMAKE_INSTALL_PREFIX}"
  MODULES smtk
          shiboken
          paraview
58
59
          pygments
          six
Ben Boeckel's avatar
Ben Boeckel committed
60
61
62
63
64
65
66
67
68
69
70
71
          vtk
          ${python_modules}
  MODULE_DIRECTORIES
          "${superbuild_install_location}/bin/Lib/site-packages"
          "${superbuild_install_location}/lib/site-packages"
          "${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
  SEARCH_DIRECTORIES
          "lib")

superbuild_windows_install_python(
  "${CMAKE_INSTALL_PREFIX}"
  MODULES vtk
72
  NAMESPACE paraview
Ben Boeckel's avatar
Ben Boeckel committed
73
74
75
76
77
  MODULE_DIRECTORIES
          "${superbuild_install_location}/bin/Lib/site-packages"
          "${superbuild_install_location}/lib/site-packages"
          "${superbuild_install_location}/lib/paraview-${paraview_version}/site-packages"
  SEARCH_DIRECTORIES
78
          "lib")
Ben Boeckel's avatar
Ben Boeckel committed
79

80
81
include(python.functions)
superbuild_install_superbuild_python()
Ben Boeckel's avatar
Ben Boeckel committed
82
83
84
85
86
87
88
89

if (pythonrequests_enabled)
  install(
    FILES       "${superbuild_install_location}/bin/Lib/site-packages/requests/cacert.pem"
    DESTINATION "${cmb_package}/bin/Lib/site-packages/requests"
    COMPONENT   superbuild)
endif ()

90
91
92
set(plugins_file "${CMAKE_CURRENT_BINARY_DIR}/.plugins")
cmb_add_plugin("${plugins_file}" ${plugins})

Ben Boeckel's avatar
Ben Boeckel committed
93
install(
94
  FILES       "${plugins_file}"
Ben Boeckel's avatar
Ben Boeckel committed
95
96
97
98
99
100
101
  DESTINATION "bin"
  COMPONENT   superbuild)

install(
  DIRECTORY   "${superbuild_install_location}/share/cmb/workflows/"
  DESTINATION "share/cmb/workflows"
  COMPONENT   superbuild)