CMakeLists.txt 18.4 KB
Newer Older
1

2
3
4
5
#-----------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
#-----------------------------------------------------------------------------

6
#-----------------------------------------------------------------------------
partyd's avatar
partyd committed
7
project(Slicer3)
8
#-----------------------------------------------------------------------------
9

10
11
12
enable_language(C)
enable_language(CXX)

13
14
#-----------------------------------------------------------------------------
# See http://cmake.org/cmake/help/cmake-2-8-docs.html#section_Policies for details
15
16
#-----------------------------------------------------------------------------

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SET(project_policies
  #CMP0001 # NEW: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
  #CMP0002 # NEW: Logical target names must be globally unique.
  CMP0003 # NEW: Libraries linked via full path no longer produce linker search paths.
  #CMP0004 # NEW: Libraries linked may NOT have leading or trailing whitespace.
  #CMP0005 # NEW: Preprocessor definition values are now escaped automatically.
  #CMP0006 # NEW: Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.
  #CMP0007 # NEW: List command no longer ignores empty elements.
  #CMP0008 # NEW: Libraries linked by full-path must have a valid library file name.
  #CMP0009 # NEW: FILE GLOB_RECURSE calls should not follow symlinks by default.
  #CMP0010 # NEW: Bad variable reference syntax is an error.
  #CMP0011 # NEW: Included scripts do automatic cmake_policy PUSH and POP.
  #CMP0012 # NEW: if() recognizes numbers and boolean constants.
  #CMP0013 # NEW: Duplicate binary directories are not allowed.
  #CMP0014 # NEW: Input directories must have CMakeLists.txt
  )
FOREACH(policy ${project_policies})
  IF(POLICY ${policy})
    CMAKE_POLICY(SET ${policy} NEW)
  ENDIF()
ENDFOREACH()
38

39

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#-----------------------------------------------------------------------------
# Platform check
#-----------------------------------------------------------------------------

set(PLATFORM_CHECK true)

if(PLATFORM_CHECK)
  # See CMake/Modules/Platform/Darwin.cmake)
  #   6.x == Mac OSX 10.2 (Jaguar)
  #   7.x == Mac OSX 10.3 (Panther)
  #   8.x == Mac OSX 10.4 (Tiger)
  #   9.x == Mac OSX 10.5 (Leopard)
  #  10.x == Mac OSX 10.6 (Snow Leopard)
  if (DARWIN_MAJOR_VERSION LESS "8")
    message(FATAL_ERROR "Only Mac OSX >= 10.4 are supported !")
  endif()
endif()

58
59
#-----------------------------------------------------------------------------
# Update CMake module path
60
61
#------------------------------------------------------------------------------

62
63
64
set(CMAKE_MODULE_PATH
  ${CMAKE_SOURCE_DIR}/CMake
  ${CMAKE_BINARY_DIR}/CMake
65
  ${CMAKE_CURRENT_SOURCE_DIR}
66
  ${CMAKE_CURRENT_SOURCE_DIR}/../CMake # Slicer3 CMake directory
67
68
  ${CMAKE_MODULE_PATH}
  )
69

70
71
#-----------------------------------------------------------------------------
# Convenient macro allowing to download a file
72
73
#------------------------------------------------------------------------------

74
FUNCTION(downloadFile url dest)
75
76
77
  FILE(DOWNLOAD ${url} ${dest} STATUS status)
  LIST(GET status 0 error_code)
  LIST(GET status 1 error_msg)
78
79
  IF(error_code OR NOT EXISTS ${dest})
    MESSAGE(FATAL_ERROR "error: Failed to download ${url}")
80
  ENDIF()
81
ENDFUNCTION()
82
83
84

#-----------------------------------------------------------------------------
# Prerequisites
85
86
#------------------------------------------------------------------------------

87
88
89
90
91
92
option(Slicer3_USE_GIT_PROTOCOL "If behind a firewall turn this off to use http instead." ON)

set(git_protocol "git")
if(NOT Slicer3_USE_GIT_PROTOCOL)
  set(git_protocol "http")
endif()
93

94
set(git_repo http://github.com/commontk/CTK/raw/master/)
95
96
97
set(file CMake/ExternalProject.cmake)
downloadFile(${git_repo}/${file} ${CMAKE_BINARY_DIR}/${file})

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#-----------------------------------------------------------------------------
# Include External project module
#------------------------------------------------------------------------------

set(base "${CMAKE_BINARY_DIR}/CMakeExternals")
set(prefix "${base}/Install")

include(ExternalProject)

# Compute -G arg for configuring external projects with the same CMake generator:
if(CMAKE_EXTRA_GENERATOR)
  set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
else()
  set(gen "${CMAKE_GENERATOR}")
endif()

114
115
#-----------------------------------------------------------------------------
# Disable the warnings that DevStudio 2005 emits wrt to sprintf, strcpu, etc.
116
117
#------------------------------------------------------------------------------

118
# Disable warnings that DevStudio 2005 emits wrt to sprintf, strcpu, etc.
119
120
if(CMAKE_COMPILER_2005)
  add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
121
endif()
122

123
124
125
126
127
128
# DevStudio 9.0 - Disable warning C4996: [...] This function or variable may be unsafe. [...]
# To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details
if(MSVC90)
  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(MSVC90)

129
130
131
#-----------------------------------------------------------------------------
# Always build Shared library
#------------------------------------------------------------------------------
132

133
set(BUILD_SHARED_LIBS ON)
134

135
136
137
#-----------------------------------------------------------------------------
# Setup build type
#------------------------------------------------------------------------------
138

139
140
141
142
143
144
145
146
147
# By default, let's build as Debug
if(NOT DEFINED CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE "Debug")
endif()

# let a dashboard override the default.
if(CTEST_BUILD_CONFIGURATION)
  set(CMAKE_BUILD_TYPE "${CTEST_BUILD_CONFIGURATION}")
endif()
148
149


150
151
152
#-----------------------------------------------------------------------------
# Slicer Options
#-----------------------------------------------------------------------------
153

154
155
156
157
#
#                         ----------------------------
#                         | Case 1 | Case 2 | Case 3 |
# ----------------------------------------------------
158
159
160
161
162
163
164
# | MAC{32,64}{Tiger,Leo} |  ON    |   -    |  OK    |
# ----------------------------------------------------
# | WIN{32,64} VS2008     |  OK    |  OK    |  OK    |
# ----------------------------------------------------
# | Linux{32,64}          |  OK    |  OK    |  OK    |
# ----------------------------------------------------
# ----------------------------------------------------
165
166
167
168
169
170
171
172
# | Slicer3_USE_KWWIDGETS |  ON    |  ON    |  OFF   |
# |---------------------------------------------------
# | Slicer3_USE_QT        |  OFF   |  ON    |  ON    |
# |--------------------------------------------------|
# | Slicer3_USE_PYTHON    | ON|OFF | ON|OFF |  OFF   |
# |--------------------------------------------------|
# | Slicer3_USE_PYTHONQT  |   OFF  |  OFF   | ON|OFF |
# |---------------------------------------------------
173

174
#
175
176
177
178
179
180
181
# Case 1: [Slicer3_USE_KWWIDGETS: ON, Slicer3_USE_QT: OFF, VTK_WRAP_TCL:ON]
#   a) KwwOnly-NoPython  
#   b) KwwOnly-Python    
# 
# Case 2: [Slicer3_USE_KWWIDGETS: ON, Slicer3_USE_QT: ON, VTK_WRAP_TCL:ON]
#   a) KwwAndQt-NoPython-NoPythonQt
#   b) KwwAndQt-Python
182
183
#   c) KwwAndQt-PythonQt          [VTK_WRAP_PYTHON: ON]  -> NOT SUPPORTED
#   d) KwwAndQt-Python-PythonQt                          -> NOT SUPPORTED
184
185
186
187
188
189
190
#
# Case 3: [Slicer3_USE_KWWIDGETS: OFF, Slicer3_USE_QT: ON,  VTK_WRAP_TCL:OFF]
#   a) QtOnly-NoPythonQt
#   b) QtOnly-PythonQt            [VTK_WRAP_PYTHON: ON]
#
#
# Note:
191
192
#   Tcl, Tk, and incrTcl are built in all cases
#   blt and iwidgets are build only if Slicer3_USE_KWWIDGETS is ON
193
194
#   Python is build if either Slicer3_USE_PYTHON or Slicer3_USE_PYTHONQT are ON
# 
195

196
197
198
199
#------------------------------------------------------------------------------
# KWWidgets option
#------------------------------------------------------------------------------  

200
201
# KWWidgets off by default.
option(Slicer3_USE_KWWIDGETS "Build Slicer3 KWWidgets GUI" OFF)
202

203
204
205
206
207

#------------------------------------------------------------------------------
# Qt option
#------------------------------------------------------------------------------  

208
option(Slicer3_USE_QT  "Build Slicer3 Qt GUI" ON)
209
210

if(Slicer3_USE_QT)
211
  set(minimum_required_qt_version "4.6.2")
212
213
214
215
216
217
218
219
220
221
222
223
224
225
  # For Mac OS X 10.6, Apple has started recommending developers to build their applications 64-bit.
  # The main reason is that there is a small speed increase due to the extra registers on Intel 
  #CPU's, all their machine offerings have been 64-bit since 2007, and there is a cost for reading 
  # all the 32-bit libraries into memory if everything else is 64-bit. If you want to follow this
  # advice, there is only one choice, 64-bit Cocoa.
  #
  # See CMake/Modules/Platform/Darwin.cmake)
  #   6.x == Mac OSX 10.2 (Jaguar)
  #   7.x == Mac OSX 10.3 (Panther)
  #   8.x == Mac OSX 10.4 (Tiger)
  #   9.x == Mac OSX 10.5 (Leopard)
  #  10.x == Mac OSX 10.6 (Snow Leopard)

  if(DARWIN_MAJOR_VERSION GREATER "10")
226
227
    set(minimum_required_qt_version "4.7.0")
  endif()
228
  
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
  find_package(Qt4)
  
  if(QT4_FOUND)
    
    set(current_qt_version "${QT_VERSION_MAJOR}.${QT_VERSION_MINOR}.${QT_VERSION_PATCH}")
  
    if("${current_qt_version}" VERSION_LESS "${minimum_required_qt_version}")
      message(FATAL_ERROR "error: Slicer requires Qt >= ${minimum_required_qt_version} -- you cannot use Qt ${current_qt_version}.")
    endif()
  
    # Enable modules
    SET(QT_USE_QTNETWORK ON)
    
    # Includes Qt headers
    INCLUDE(${QT_USE_FILE})
244

245
246
    option(Slicer3_USE_PYTHONQT "Integrate a PythonQt interpreter into Slicer." ON)
    option(Slicer3_USE_PYTHONQT_WITH_TCL "Enable PythonQt Tcl adapter layer" ON)
247
248
249
    
    option(Slicer_USE_CTKAPPLAUNCHER "Configure ctkAppLauncher." OFF)
    mark_as_advanced(Slicer_USE_CTKAPPLAUNCHER)
250
  
251
252
  else()
    MESSAGE(FATAL_ERROR "error: Qt >= ${minimum_required_qt_version} was not found on your system. You probably need to set the QT_QMAKE_EXECUTABLE variable")
253
254
  endif()
  
255
endif()
256
257
258
259
  
#------------------------------------------------------------------------------
# Python option
#------------------------------------------------------------------------------  
260

261
option(Slicer3_USE_PYTHON "Build Slicer with Python support" OFF)
262

263
if(Slicer3_USE_PYTHON OR Slicer3_USE_PYTHONQT)
264

265
  option(Slicer3_BUILD_NUMPY "Build Slicer with NumPy (builds CLapack)." ON)
266

267
268
269
270
271
272
  # Work in progress ...
  #if(Slicer3_BUILD_NUMPY)
  #  option(Slicer3_BUILD_SCIPY "Build Slicer with SciPy (requires NumPy)" ON)
  #endif()
  
endif()
273

274
275
276
277
278
279
280
281
#------------------------------------------------------------------------------
# Additional options
#------------------------------------------------------------------------------  

# Enable VTK Debug Leaks
option(Slicer3_USE_VTK_DEBUG_LEAKS 
  "Turn on VTKs Debug Leaks functionality in both VTK and Slicer." ON)
  
282
283
284
# Enable the build of Command line module
option(Slicer3_BUILD_CLI "Build Slicer3 CLI Plugins" ON)
  
285
286
287
288
#------------------------------------------------------------------------------
# Validate options
#------------------------------------------------------------------------------  

289
290
291
292
293
294
295
if (NOT Slicer3_USE_KWWIDGETS AND NOT Slicer3_USE_QT)
  set(err "error: Slicer SuperBuild requires at least Slicer3_USE_KWWIDGETS or Slicer3_USE_QT to be ON.

Slicer3_USE_KWWIDGETS = ON
 -> Means Slicer will be built only with KWWidgets support.
 
Slicer3_USE_KWWIDGETS = ON and Slicer3_USE_QT = ON
296
 -> Means Slicer will be built with both KWWidgets and QT support. Note: NOT supported on Mac
297
298
299
300
301
302
303
304
305
306
 
Slicer3_USE_QT = ON
 -> Means Slicer will be build only with QT support.
")

  message(FATAL_ERROR "${err}")
endif()

if (Slicer3_USE_PYTHON AND Slicer3_USE_PYTHONQT)
  set(err "error: Slicer SuperBuild doesn't support Slicer3_USE_PYTHON and Slicer3_USE_PYTHONQT ON.")
307
308
309
310
311
312
313
  message(FATAL_ERROR "${err}")
endif()

if (Slicer3_USE_KWWIDGETS AND Slicer3_USE_PYTHONQT)
  set(err "error: Slicer SuperBuild doesn't support Slicer3_USE_KWWIDGETS and Slicer3_USE_PYTHONQT ON.")
  message(FATAL_ERROR "${err}")
endif()
314

315
316
if (Slicer3_USE_KWWIDGETS AND Slicer3_USE_QT AND APPLE)
  set(err "error: Slicer SuperBuild on Mac doesn't support Slicer3_USE_KWWIDGETS and Slicer3_USE_QT ON")
317
318
  message(FATAL_ERROR "${err}")
endif()
319

320
321
322
#------------------------------------------------------------------------------
# Configure the CTest custom file - Used to suppress external project configure/build warnings
#------------------------------------------------------------------------------  
323

324
configure_file(
325
  ${CMAKE_CURRENT_SOURCE_DIR}/../SuperBuild/CTestCustom.cmake.in
326
327
  ${Slicer3_BINARY_DIR}/CTestCustom.cmake
  @ONLY IMMEDIATE)
328
329
330
331
332

#------------------------------------------------------------------------------
# Establish Target Dependencies based on Selected Options
#------------------------------------------------------------------------------

333
set(tcl_DEPENDENCIES)
334
335
set(tk_DEPENDENCIES tcl)
set(incrTcl_DEPENDENCIES tcl tk)
336
set(iwidgets_DEPENDENCIES tcl itcl)
337
set(blt_DEPENDENCIES tcl tk)
338
set(python_DEPENDENCIES)
339
if(Slicer3_USE_KWWIDGETS OR Slicer3_USE_PYTHONQT_WITH_TCL)
340
341
342
343
344
  if(WIN32)
    set(python_DEPENDENCIES tcl)
  else()
    set(python_DEPENDENCIES tk)
  endif()
345
endif()
346
347
set(CLAPACK_DEPENDENCIES)
set(NUMPY_DEPENDENCIES CLAPACK python)
348
set(scipy_DEPENDENCIES NUMPY)
blezek's avatar
blezek committed
349
set(weave_DEPENDENCIES python NUMPY)
350

351
set(VTK_DEPENDENCIES)
352
set(CTKAPPLAUNCHER_DEPENDENCIES)
353
set(CTK_DEPENDENCIES VTK)
354
if(Slicer3_USE_PYTHONQT)
355
  list(APPEND CTK_DEPENDENCIES python)
356
endif()
357
set(KWWidgets_DEPENDENCIES VTK)
358
set(Insight_DEPENDENCIES)
359
360
set(BatchMake_DEPENDENCIES Insight)
set(OpenIGTLink_DEPENDENCIES)
361
set(teem_DEPENDENCIES VTK)
362
set(cmcurl_DEPENDENCIES)
363
set(slicer_DEPENDENCIES VTK Insight BatchMake OpenIGTLink teem cmcurl)
364
365

#------------------------------------------------------------------------------
366
# Conditionnaly include ExternalProject Target
367
#------------------------------------------------------------------------------
368

369
370
371
372
373
if(Slicer3_USE_KWWIDGETS OR Slicer3_USE_PYTHONQT_WITH_TCL)
  include(External_Tcl)
  include(External_Tk)
  include(External_incrTcl)
endif()
374
if(Slicer3_USE_KWWIDGETS)
375
376
  include(External_iwidgets)
  include(External_blt)
377
endif()
378

379
if(Slicer3_USE_PYTHON OR Slicer3_USE_PYTHONQT)
380
  include(External_Python26)
381
382
383
  if(Slicer3_BUILD_NUMPY)
    include(External_CLAPACK)
    include(External_NUMPY)
blezek's avatar
blezek committed
384
    include(External_weave)
385
386
387
388
389
    if(Slicer3_BUILD_SCIPY)
      include(External_SciPy)
    endif(Slicer3_BUILD_SCIPY)
  endif()
endif()
390

391
include(External_VTK)
392

393
if(Slicer3_USE_QT)
394
  include(External_CTK)
395
396
397
  if (Slicer_USE_CTKAPPLAUNCHER)
    include(External_CTKAPPLAUNCHER)
  endif()
398
endif()
399

400
if(Slicer3_USE_KWWIDGETS)
401
  include(External_KWWidgets)
402
endif()
403

404
405
406
407
408
include(External_Insight)
include(External_teem)
include(External_OpenIGTLink)
include(External_BatchMake)
include(External_cmcurl)
409

410
#-----------------------------------------------------------------------------
411
412
# Update external project dependencies
#------------------------------------------------------------------------------
413

414
# For now, tk and itcl are used only when Slicer3_USE_KWWIDGETS is ON
415
if(Slicer3_USE_KWWIDGETS)
416
417
418
  if(WIN32)
    list(APPEND slicer_DEPENDENCIES tcl KWWidgets)
  else()
419
    list(APPEND slicer_DEPENDENCIES tcl tk blt iwidgets itcl KWWidgets)
420
  endif()
421
endif()
partyd's avatar
partyd committed
422

423
424
425
426
427
428
if (Slicer3_USE_PYTHONQT_WITH_TCL)
  if(UNIX)
    list(APPEND slicer_DEPENDENCIES itcl)
  endif()
endif()

429
if(Slicer3_USE_QT)
430
  list(APPEND slicer_DEPENDENCIES CTK)
431
432
433
  if (Slicer_USE_CTKAPPLAUNCHER)
    list(APPEND slicer_DEPENDENCIES CTKAPPLAUNCHER)
  endif()
434
endif()
435

436
if(Slicer3_USE_PYTHON OR Slicer3_USE_PYTHONQT)
437
  list(APPEND slicer_DEPENDENCIES python)
438
439
440
441
442
443
444
  if(Slicer3_BUILD_NUMPY)
    list(APPEND slicer_DEPENDENCIES NUMPY)
    if(Slicer3_BUILD_SCIPY)
      list(APPEND slicer_DEPENDENCIES scipy)
    endif()
  endif()
endif()
445

446
447
448
449
#------------------------------------------------------------------------------
# List of external projects
#------------------------------------------------------------------------------  

450
set(external_project_list tk tcl incrTcl iwidgets blt python CLAPACK NUMPY scipy VTK CTK KWWidgets Insight BatchMake OpenIGTLink teem cmcurl slicer)
451

452
453
454
455
456
#-----------------------------------------------------------------------------
# Dump external project dependencies
#------------------------------------------------------------------------------

set(ep_dependency_graph "# External project dependencies")
457
foreach(ep ${external_project_list})
458
459
460
  set(ep_dependency_graph "${ep_dependency_graph}\n${ep}:${${ep}_DEPENDENCIES}")
endforeach()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalProjectDependencies.txt "${ep_dependency_graph}\n")
461

462
463
464
465
466
467
#-----------------------------------------------------------------------------
# Configure and build Slicer
# Note that the Slicer3Version.txt file will be created at configuration time
#------------------------------------------------------------------------------

set(proj Slicer3)
468
ExternalProject_Add(${proj}
469
  DEPENDS ${slicer_DEPENDENCIES}
470
471
  DOWNLOAD_COMMAND ""
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..
472
473
474
  BINARY_DIR Slicer3-build
  CMAKE_GENERATOR ${gen}
  CMAKE_ARGS
475
    -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
476
477
478
    -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
    -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
479
480
    -DSubversion_SVN_EXECUTABLE:FILEPATH=${Subversion_SVN_EXECUTABLE}
    # Slicer specific options
481
482
    -DBUILD_EXAMPLES:BOOL=OFF
    -DBUILD_TESTING:BOOL=ON
483
    -DSlicer3_BUILD_CLI:BOOL=${Slicer3_BUILD_CLI}
484
    # ITK
485
    -DITK_DIR:PATH=${ITK_DIR}
486
    # Teem
partyd's avatar
partyd committed
487
    -DTeem_DIR:PATH=${CMAKE_BINARY_DIR}/teem-build
488
489
    # OpenIGTLink
    -DSlicer3_USE_OPENIGTLINK:BOOL=ON
partyd's avatar
partyd committed
490
    -DOpenIGTLink_DIR:PATH=${CMAKE_BINARY_DIR}/OpenIGTLink-build
491
    # BatchMake
492
    -DSlicer_USE_BatchMake=ON
partyd's avatar
partyd committed
493
    -DBatchMake_DIR:PATH=${CMAKE_BINARY_DIR}/BatchMake-build
494
    # VTK
495
    -DVTK_DIR:PATH=${VTK_DIR}
496
497
    -DVTK_DEBUG_LEAKS:BOOL=${Slicer3_USE_VTK_DEBUG_LEAKS}
    # TCL/Tk
partyd's avatar
partyd committed
498
499
    -DINCR_TCL_LIBRARY:FILEPATH=${slicer_TCL_LIB}
    -DINCR_TK_LIBRARY:FILEPATH=${slicer_TK_LIB}
partyd's avatar
partyd committed
500
    -DSlicer3_TCL_DIR:PATH=${tcl_build}
501
    # cmcurl
partyd's avatar
partyd committed
502
    -DSLICERLIBCURL_DIR:PATH=${CMAKE_BINARY_DIR}/cmcurl-build
503
    # Python
504
    -DSlicer3_USE_PYTHON:BOOL=${Slicer3_USE_PYTHON}
505
    -DSlicer3_USE_PYTHONQT:BOOL=${Slicer3_USE_PYTHONQT}
506
    -DSlicer3_USE_PYTHONQT_WITH_TCL:BOOL=${Slicer3_USE_PYTHONQT_WITH_TCL}
507
    -DSlicer3_USE_SYSTEM_PYTHON:BOOL=OFF
508
    -DSlicer3_USE_NUMPY:BOOL=${Slicer3_BUILD_NUMPY}
partyd's avatar
partyd committed
509
    -DPYTHON_EXECUTABLE:FILEPATH=${slicer_PYTHON_EXECUTABLE}
510
    -DPYTHON_INCLUDE_DIR:PATH=${slicer_PYTHON_INCLUDE}
511
    -DPYTHON_LIBRARY:FILEPATH=${slicer_PYTHON_LIBRARY}
512
    # Qt
513
    -DSlicer3_USE_QT:BOOL=${Slicer3_USE_QT}
514
    -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}
515
    -DCTK_DIR:PATH=${CTK_DIR}
516
517
    -DSlicer_USE_CTKAPPLAUNCHER:BOOL=${Slicer_USE_CTKAPPLAUNCHER}
    -DCTKAPPLAUNCHER_DIR:PATH=${CTKAPPLAUNCHER_DIR}
518
    # KWWidgets
519
    -DSlicer3_USE_KWWIDGETS:BOOL=${Slicer3_USE_KWWIDGETS}
520
    -DKWWidgets_DIR:PATH=${CMAKE_BINARY_DIR}/KWWidgets-build
521
522
  INSTALL_COMMAND ""
)