CMakeLists.txt 2.53 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
PROJECT(SlicerDaemon)

# --------------------------------------------------------------------------
# Sources

SET(SlicerDaemon_SRCS
  #vtkSlicerDaemonLogic.cxx
  #vtkSlicerDaemonGUI.cxx
  #vtkMRMLSlicerDaemonNode.cxx
  vtkTclHelper.cxx
)

# Abstract/pure virtual classes

#SET_SOURCE_FILES_PROPERTIES(
  #vtkModule.cxx
  #PROPERTIES
  #ABSTRACT "TRUE"
  #)

# Helper classes

#SET_SOURCE_FILES_PROPERTIES(
  #vtkModule.cxx
  #PROPERTIES
  #WRAP_EXCLUDE "TRUE"
  #)

# --------------------------------------------------------------------------
# Include dirs

INCLUDE_DIRECTORIES(
  ${ModulesBaseClasses_SOURCE_DIR}
  ${ModulesBaseClasses_BINARY_DIR}
  ${SlicerDaemon_SOURCE_DIR}
  ${SlicerDaemon_BINARY_DIR}
  ${SlicerBase_SOURCE_DIR}
  ${SlicerBase_BINARY_DIR}
  ${SlicerBaseLogic_SOURCE_DIR}
  ${SlicerBaseLogic_BINARY_DIR}
  ${SlicerBaseGUI_SOURCE_DIR}
  ${SlicerBaseGUI_BINARY_DIR}
  ${VTK_INCLUDE_DIR}
  ${MRML_SOURCE_DIR}
  ${MRML_BINARY_DIR}
  )


# --------------------------------------------------------------------------
# Wrapping

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE("${VTK_CMAKE_DIR}/vtkWrapTcl.cmake")
VTK_WRAP_TCL3(SlicerDaemon SlicerDaemon_TCL_SRCS "${SlicerDaemon_SRCS}" "")


# --------------------------------------------------------------------------
# Build the library

ADD_LIBRARY(SlicerDaemon
  ${SlicerDaemon_SRCS}
  ${SlicerDaemon_TCL_SRCS}
  )

IF(BUILD_SHARED_LIBS)
  INSTALL_TARGETS(${SLICER3_LIB_INSTALL_DIR} SlicerDaemon)
ENDIF(BUILD_SHARED_LIBS)

TARGET_LINK_LIBRARIES(SlicerDaemon
  ModulesBaseClasses
  SlicerBaseLogic 
  SlicerBaseGUI 
  MRML
  vtkCommonTCL
  vtkImagingTCL
  ${KWWidgets_LIBRARIES} )



# --------------------------------------------------------------------------
# Testing (requires some of the examples)

IF(BUILD_TESTING)
  SUBDIRS(Testing)
ENDIF(BUILD_TESTING)

87
88
89
#
# configure files to drop in the build directory
#
90
91
92
93
CONFIGURE_FILE(
  ${SlicerDaemon_SOURCE_DIR}/vtkSlicerDaemonConfigure.h.in 
  ${SlicerDaemon_BINARY_DIR}/vtkSlicerDaemonConfigure.h
)
94
95
96

CONFIGURE_FILE(
  ${SlicerDaemon_SOURCE_DIR}/Tcl/slicerd.tcl
97
  ${SLICER_LIBRARIES_DIR}/slicerd.tcl
98
99
100
101
)

CONFIGURE_FILE(
  ${SlicerDaemon_SOURCE_DIR}/Tcl/slicerget.tcl
102
  ${SLICER_LIBRARIES_DIR}/slicerget.tcl
103
104
105
106
)

CONFIGURE_FILE(
  ${SlicerDaemon_SOURCE_DIR}/Tcl/slicerput.tcl
107
  ${SLICER_LIBRARIES_DIR}/slicerput.tcl
108
)
109
110
111
112
113
114
115
116
117
118
119
120
121
122

INSTALL(FILES
  "${SLICER_LIBRARIES_DIR}/slicerd.tcl"
  DESTINATION lib/Slicer3)

INSTALL(FILES
  "${SLICER_LIBRARIES_DIR}/slicerput.tcl"
  DESTINATION lib/Slicer3)

INSTALL(FILES
  "${SLICER_LIBRARIES_DIR}/slicerget.tcl"
  DESTINATION lib/Slicer3)