CMakeLists.txt 4.59 KB
Newer Older
Clinton Stimpson's avatar
   
Clinton Stimpson committed
1

Clinton Stimpson's avatar
   
Clinton Stimpson committed
2
3
PROJECT(QtTesting)

4
5
6
7
8
9
10
SET(QT_TESTING_WITH_XML OFF)
# if Qt has XML module
IF(QT_QTXML_FOUND)
  SET(QT_TESTING_WITH_XML ON)
  SET(QT_USE_QTXML TRUE)
  INCLUDE(${QT_USE_FILE})
ENDIF(QT_QTXML_FOUND)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
11

12
IF(QT_TESTING_WITH_PYTHON)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
13
14
  
  INCLUDE(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
15
16
17
18
19
20
21
22
23
24
25
26
  
  IF(UNIX)
    FIND_LIBRARY(PYTHON_UTIL_LIBRARY
      NAMES util
      PATHS /usr/lib
      DOC "Utility library needed for vtkpython"
      )
    MARK_AS_ADVANCED(PYTHON_UTIL_LIBRARY)
    IF(PYTHON_UTIL_LIBRARY)
      SET(PYTHON_UTIL_LIBRARY_LIB ${PYTHON_UTIL_LIBRARY})
    ENDIF(PYTHON_UTIL_LIBRARY)
  ENDIF(UNIX)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
27

Clinton Stimpson's avatar
   
Clinton Stimpson committed
28
  INCLUDE_DIRECTORIES(
Clinton Stimpson's avatar
   
Clinton Stimpson committed
29
    ${VTK_INCLUDE_DIR}
Clinton Stimpson's avatar
   
Clinton Stimpson committed
30
31
32
33
    ${PYTHON_INCLUDE_PATH}
  )
  SET(PYTHON_MOCS
    pqPythonEventObserver.h
34
    pqPythonEventSource.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
35
36
37
38
39
40
41
  )
  SET(PYTHON_SRCS
    pqPythonEventObserver.cxx
    pqPythonEventObserver.h
    pqPythonEventSource.cxx
    pqPythonEventSource.h
  )
42
ENDIF(QT_TESTING_WITH_PYTHON)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
43

44
45
46
47
48
49
50
51
52
53
54
55
56
57
IF(QT_TESTING_WITH_XML)
  SET(XML_MOCS
    pqXMLEventObserver.h
  )
  SET(XML_SRCS
    pqXMLEventObserver.cxx
    pqXMLEventObserver.h
    pqXMLEventSource.cxx
    pqXMLEventSource.h
  )
ENDIF(QT_TESTING_WITH_XML)



Clinton Stimpson's avatar
   
Clinton Stimpson committed
58

Clinton Stimpson's avatar
   
Clinton Stimpson committed
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
INCLUDE_DIRECTORIES(
  ${QtTesting_BINARY_DIR}
  ${QtTesting_SOURCE_DIR}
)

# Reduce the number of dirs that get included on moc command line
# since it causes issues on Windows 2000.
GET_DIRECTORY_PROPERTY(include_dirs_tmp INCLUDE_DIRECTORIES)
SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${MOC_INCLUDE_DIRS}")

QT4_WRAP_CPP(MOC_BUILT_SOURCES
  pqAbstractButtonEventTranslator.h
  pqAbstractItemViewEventTranslator.h
  pqAbstractSliderEventTranslator.h
  pqBasicWidgetEventTranslator.h
  pqComboBoxEventTranslator.h
  pqDoubleSpinBoxEventTranslator.h
76
  pqEventDispatcher.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
77
  pqEventObserver.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
78
  pqEventPlayer.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
79
  pqEventSource.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
80
81
82
83
84
  pqEventTranslator.h
  pqLineEditEventTranslator.h
  pqMenuEventTranslator.h
  pqRecordEventsDialog.h
  pqSpinBoxEventTranslator.h
85
  pqStdoutEventObserver.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
86
  pqTestUtility.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
87
  pqThreadedEventSource.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
88
  pqTabBarEventTranslator.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
89
  pqWidgetEventTranslator.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
90
  ${PYTHON_MOCS}
91
  ${XML_MOCS}
Clinton Stimpson's avatar
   
Clinton Stimpson committed
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
)

SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${include_dirs_tmp}")

QT4_WRAP_UI(UI_BUILT_SOURCES
  pqRecordEventsDialog.ui
)

ADD_LIBRARY(QtTesting
  QtTestingExport.h
  pqAbstractActivateEventPlayer.cxx
  pqAbstractActivateEventPlayer.h
  pqAbstractBooleanEventPlayer.cxx
  pqAbstractBooleanEventPlayer.h
  pqAbstractButtonEventTranslator.cxx
  pqAbstractButtonEventTranslator.h
  pqAbstractDoubleEventPlayer.cxx
  pqAbstractDoubleEventPlayer.h
  pqAbstractIntEventPlayer.cxx
  pqAbstractIntEventPlayer.h
  pqAbstractItemViewEventPlayer.cxx
  pqAbstractItemViewEventPlayer.h
  pqAbstractItemViewEventTranslator.cxx
  pqAbstractItemViewEventTranslator.h
  pqAbstractSliderEventTranslator.cxx
  pqAbstractSliderEventTranslator.h
  pqAbstractStringEventPlayer.cxx
  pqAbstractStringEventPlayer.h
  pqBasicWidgetEventPlayer.cxx
  pqBasicWidgetEventPlayer.h
  pqBasicWidgetEventTranslator.cxx
  pqBasicWidgetEventTranslator.h
  pqComboBoxEventTranslator.cxx
  pqComboBoxEventTranslator.h
  pqDoubleSpinBoxEventTranslator.cxx
  pqDoubleSpinBoxEventTranslator.h
128
129
  pqEventDispatcher.cxx
  pqEventDispatcher.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
130
131
  pqEventObserver.cxx
  pqEventObserver.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
132
133
134
135
  pqEventPlayer.cxx
  pqEventPlayer.h
  pqEventTranslator.cxx
  pqEventTranslator.h
136
  pqEventSource.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
137
138
139
140
141
142
143
144
145
146
  pqLineEditEventTranslator.cxx
  pqLineEditEventTranslator.h
  pqMenuEventTranslator.cxx
  pqMenuEventTranslator.h
  pqObjectNaming.cxx
  pqObjectNaming.h
  pqRecordEventsDialog.cxx
  pqRecordEventsDialog.h
  pqSpinBoxEventTranslator.cxx
  pqSpinBoxEventTranslator.h
147
148
  pqStdoutEventObserver.cxx
  pqStdoutEventObserver.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
149
150
151
152
  pqTabBarEventPlayer.cxx
  pqTabBarEventPlayer.h
  pqTabBarEventTranslator.cxx
  pqTabBarEventTranslator.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
153
154
  pqTestUtility.cxx
  pqTestUtility.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
155
156
  pqThreadedEventSource.cxx
  pqThreadedEventSource.h
Clinton Stimpson's avatar
   
Clinton Stimpson committed
157
  pqWidgetEventPlayer.cxx
Clinton Stimpson's avatar
   
Clinton Stimpson committed
158
159
160
161
  pqWidgetEventPlayer.h
  pqWidgetEventTranslator.h
  ${MOC_BUILT_SOURCES}
  ${UI_BUILT_SOURCES}
Clinton Stimpson's avatar
   
Clinton Stimpson committed
162
  ${PYTHON_SRCS}
163
  ${XML_SRCS}
Clinton Stimpson's avatar
   
Clinton Stimpson committed
164
165
166
167
168
169
170
171
)

SOURCE_GROUP("Generated" FILES
  ${MOC_BUILT_SOURCES}
  ${UI_BUILT_SOURCES}
)

TARGET_LINK_LIBRARIES(QtTesting
172
  ${QT_LIBRARIES} 
Clinton Stimpson's avatar
   
Clinton Stimpson committed
173
174
)

175
IF(QT_TESTING_WITH_PYTHON)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
176
177
  TARGET_LINK_LIBRARIES(QtTesting
    ${PYTHON_LIBRARIES}
Clinton Stimpson's avatar
   
Clinton Stimpson committed
178
    ${PYTHON_UTIL_LIBRARY_LIB}
Clinton Stimpson's avatar
   
Clinton Stimpson committed
179
  )
180
ENDIF(QT_TESTING_WITH_PYTHON)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
181

182
SET(QTTESTING_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
Clinton Stimpson's avatar
   
Clinton Stimpson committed
183
184
185
CONFIGURE_FILE(${QtTesting_SOURCE_DIR}/QtTestingConfigure.h.in
               ${QtTesting_BINARY_DIR}/QtTestingConfigure.h)

Clinton Stimpson's avatar
   
Clinton Stimpson committed
186
187
188
189
INSTALL(TARGETS QtTesting
  RUNTIME DESTINATION ${PV_INSTALL_BIN_DIR_CM24} COMPONENT Runtime
  LIBRARY DESTINATION ${PV_INSTALL_LIB_DIR_CM24} COMPONENT Runtime
  ARCHIVE DESTINATION ${PV_INSTALL_LIB_DIR_CM24} COMPONENT Development)
Clinton Stimpson's avatar
   
Clinton Stimpson committed
190
191