SlicerCTKAppLauncherSettings.cmake 7.99 KB
Newer Older
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
40
41
################################################################################
#
#  Program: 3D Slicer
#
#  Copyright (c) 2010 Kitware Inc.
#
#  See Doc/copyright/copyright.txt
#  or http://www.slicer.org/copyright/copyright.txt for details.
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.
#
#  This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
#  and was partially funded by NIH grant 3P41RR013218-12S1
#
################################################################################

# Build type
SET(CTKAPPLAUNCHER_BUILD_TYPE)
IF(WIN32)
  SET(CTKAPPLAUNCHER_BUILD_TYPE ${CMAKE_BUILD_TYPE})
ENDIF()
 
#-----------------------------------------------------------------------------
# Settings specific to the build tree.
#

#
# LIBRARY_PATHS
#
SET(SLICER_LIBRARY_PATHS_BUILD
  ${VTK_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
  ${CTK_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
  ${CTK_DIR}/CMakeExternals/Build/PythonQt/${CTKAPPLAUNCHER_BUILD_TYPE}
  ${QT_LIBRARY_DIR}
  ${ITK_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
  ${Teem_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
  ./bin/${CTKAPPLAUNCHER_BUILD_TYPE}
42
  ./${Slicer_INSTALL_PLUGINS_LIB_DIR}/${CTKAPPLAUNCHER_BUILD_TYPE}
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  ./${Slicer3_INSTALL_QTLOADABLEMODULES_LIB_DIR}/${CTKAPPLAUNCHER_BUILD_TYPE}
  )

IF(Slicer3_USE_PYTHONQT_WITH_TCL)
  LIST(APPEND SLICER_LIBRARY_PATHS_BUILD
    ${Slicer3_TCL_DIR}/lib
    )
  IF(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    LIST(APPEND SLICER_LIBRARY_PATHS_BUILD
      ${Slicer3_TCL_DIR}/lib/itcl${INCR_TCL_VERSION_DOT}
      ${Slicer3_TCL_DIR}/lib/itk${INCR_TCL_VERSION_DOT}
      )
  ENDIF()
ENDIF()

58
IF(Slicer_USE_BatchMake)
59
60
61
62
63
  LIST(APPEND SLICER_LIBRARY_PATHS_BUILD
    ${BatchMake_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
    )
ENDIF()

64
IF(Slicer_USE_OPENIGTLINK)
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  LIST(APPEND SLICER_LIBRARY_PATHS_BUILD
    ${OpenIGTLink_DIR}
    ${OpenIGTLink_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
    )
ENDIF()

IF(Slicer3_USE_PYTHONQT)
  get_filename_component(SLICER_PYTHON_LIB_DIR ${PYTHON_LIBRARY} PATH)
  LIST(APPEND SLICER_LIBRARY_PATHS_BUILD ${SLICER_PYTHON_LIB_DIR})
ENDIF()

#
# PATHS
#
SET(SLICER_PATHS_BUILD
  ./bin/${CTKAPPLAUNCHER_BUILD_TYPE}
81
  ./${Slicer_INSTALL_PLUGINS_LIB_DIR}/${CTKAPPLAUNCHER_BUILD_TYPE}
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
  ./${Slicer3_INSTALL_QTLOADABLEMODULES_LIB_DIR}/${CTKAPPLAUNCHER_BUILD_TYPE}
  ${Teem_DIR}/bin/${CTKAPPLAUNCHER_BUILD_TYPE}
  ${QT_BINARY_DIR}
  )
  
IF(Slicer3_USE_PYTHONQT_WITH_TCL)
  LIST(APPEND SLICER_PATHS_BUILD
    ${Slicer3_TCL_DIR}/bin
    )
ENDIF()

#
# ENVVARS
#  
SET(SLICER_ENVVARS_BUILD
  "QT_PLUGIN_PATH=./bin<PATHSEP>${CTK_DIR}/CTK-build/bin"
  )
  
IF(Slicer3_USE_PYTHONQT)
  SET(pythonpath_subdir python2.6)
  IF(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    SET(pythonpath_subdir "../Lib")
  ENDIF()
  SET(PYTHONPATH "${SLICER_PYTHON_LIB_DIR}")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP>${SLICER_PYTHON_LIB_DIR}/${pythonpath_subdir}/lib-tk")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP>${SLICER_PYTHON_LIB_DIR}/${pythonpath_subdir}/site-packages")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP>${SLICER_PYTHON_LIB_DIR}/${pythonpath_subdir}/site-packages/numpy")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP>${SLICER_PYTHON_LIB_DIR}/${pythonpath_subdir}/site-packages/numpy/lib")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP>${SLICER_PYTHON_LIB_DIR}/${pythonpath_subdir}/site-packages/numpy/core")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/bin")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/bin/python")
  
  LIST(APPEND SLICER_ENVVARS_BUILD "PYTHONPATH=${PYTHONPATH}")
ENDIF()
  
IF(Slicer3_USE_PYTHONQT_WITH_TCL)
  # Search locations for TCL packages - space separated list
  SET(TCLLIBPATH "${Slicer3_TCL_DIR}/lib/itcl${INCR_TCL_VERSION_DOT}")
  SET(TCLLIBPATH "${TCLLIBPATH} ${Slicer3_TCL_DIR}/lib/itk${INCR_TCL_VERSION_DOT}")
  
  LIST(APPEND SLICER_ENVVARS_BUILD
    "TCL_LIBRARY=${Slicer3_TCL_DIR}/lib/tcl${TCL_TK_VERSION_DOT}"
    "TK_LIBRARY=${Slicer3_TCL_DIR}/lib/tk${TCL_TK_VERSION_DOT}"
    "TCLLIBPATH=${TCLLIBPATH}"
    )
ENDIF()
  
#-----------------------------------------------------------------------------
# Settings specific to the install tree.
#

#
# LIBRARY_PATHS
#
SET(SLICER_LIBRARY_PATHS_INSTALLED
137
138
139
  ./${Slicer_INSTALL_BIN_DIR}
  ./${Slicer_INSTALL_LIB_DIR}
  ./${Slicer_INSTALL_PLUGINS_LIB_DIR}
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
  ./${Slicer3_INSTALL_QTLOADABLEMODULES_LIB_DIR}
  # Slicer Libs
  ./lib/FreeSurfer
  ./lib/ITKCommandIO
  ./lib/LoadableModule
  ./lib/MGHImageIO
  ./lib/MRML
  ./lib/MRMLCLI
  ./lib/MRMLLogic
  ./lib/MRMLDisplayableManager
  ./lib/ModuleDescriptionParser
  ./lib/MRMLIDImageIO
  ./lib/Qdec
  ./lib/RemoteIO
  ./lib/FileWatcher
  ./lib/SlicerIO
  ./lib/tclap
  ./lib/vtkITK
  ./lib/vtkTeem
  ./lib/qMRMLWidgets
  # External projects 
  ./lib/vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
  ./lib/Teem-${Teem_VERSION_MAJOR}.${Teem_VERSION_MINOR}.${Teem_VERSION_PATCH}
  ./lib/InsightToolkit
  ./lib/Qt
  ./lib/ctk-${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}
  )

168
IF(Slicer_USE_OPENIGTLINK)
169
170
171
172
173
174
175
176
  LIST(APPEND SLICER_LIBRARY_PATHS_INSTALLED
    # Slicer Libs
    ./lib/IGT
    # External projects 
    ./lib/igtl
    )
ENDIF()

177
IF(Slicer_USE_BatchMake)
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
  LIST(APPEND SLICER_LIBRARY_PATHS_INSTALLED
    ./lib/BatchMake
    ./lib/bmModuleDescriptionParser
    )
ENDIF()

IF(Slicer3_USE_PYTHONQT)
  SET(python_subdir "/lib")
  IF(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    SET(python_subdir "/PCbuild")
  ENDIF()
  LIST(APPEND SLICER_LIBRARY_PATHS_INSTALLED
    ./lib/Python${python_subdir}
    ./lib/PythonQt
    )
ENDIF()

IF(Slicer3_USE_PYTHONQT_WITH_TCL)
  LIST(APPEND SLICER_LIBRARY_PATHS_INSTALLED
    ./lib/TclTk/lib
    ./lib/TclTk/lib/itcl${INCR_TCL_VERSION_DOT}
    ./lib/TclTk/lib/itk${INCR_TCL_VERSION_DOT}
    )
ENDIF()

#
# PATHS
#  
SET(SLICER_PATHS_INSTALLED
207
208
  ./${Slicer_INSTALL_BIN_DIR}
  ./${Slicer_INSTALL_PLUGINS_BIN_DIR}
209
210
211
212
213
214
215
216
  ./${Slicer3_INSTALL_QTLOADABLEMODULES_BIN_DIR}
  )


#
# ENVVARS
#  
SET(SLICER_ENVVARS_INSTALLED
217
  "QT_PLUGIN_PATH=<APPLAUNCHER_DIR>/${Slicer_INSTALL_LIB_DIR}<PATHSEP><APPLAUNCHER_DIR>/lib/ctk-${CTK_MAJOR_VERSION}.${CTK_MINOR_VERSION}"
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
  )
  
IF(Slicer3_USE_PYTHONQT)
  SET(pythonpath_subdir python2.6)
  IF(CMAKE_SYSTEM_NAME STREQUAL "Windows")
    SET(pythonpath_subdir "")
  ENDIF()
  SET(PYTHONPATH "${SLICER_PYTHON_LIB_DIR}")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/Python/${pythonpath_subdir}/lib-tk")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/Python/${pythonpath_subdir}/site-packages")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/Python/${pythonpath_subdir}/site-packages/numpy")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/Python/${pythonpath_subdir}/site-packages/numpy/lib")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/Python/${pythonpath_subdir}/site-packages/numpy/core")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/vtk-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/FreeSurfer")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/MRML")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/MRMLLogic")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/RemoteIO")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/lib/vtkTeem")
  SET(PYTHONPATH "${PYTHONPATH}<PATHSEP><APPLAUNCHER_DIR>/bin/Python")
  
  LIST(APPEND SLICER_ENVVARS_INSTALLED "PYTHONPATH=${PYTHONPATH}")
ENDIF()
  
IF(Slicer3_USE_PYTHONQT_WITH_TCL)
  # Search locations for TCL packages - space separated list
  SET(TCLLIBPATH "<APPLAUNCHER_DIR>/lib/TclTk/lib/itcl${INCR_TCL_VERSION_DOT}")
  SET(TCLLIBPATH "${TCLLIBPATH} <APPLAUNCHER_DIR>/lib/TclTk/lib/itk${INCR_TCL_VERSION_DOT}")
  
  LIST(APPEND SLICER_ENVVARS_INSTALLED
    "TCL_LIBRARY=<APPLAUNCHER_DIR>/lib/TclTk/lib/tcl${TCL_TK_VERSION_DOT}"
    "TK_LIBRARY=<APPLAUNCHER_DIR>/lib/TclTk/lib/tk${TCL_TK_VERSION_DOT}"
    "TCLLIBPATH=${TCLLIBPATH}"
    )
ENDIF()