-
Notifications
You must be signed in to change notification settings - Fork 14
/
IJMacros.txt
189 lines (188 loc) · 8.68 KB
/
IJMacros.txt
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
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
137
138
139
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
#Macro to find a package and load it
#(you shouldn't need to modify this code)
MACRO(LOADPACKAGE Package)
SET(PackageVar ${Package})
SET(Included FALSE)
IF(EXISTS "/home/tester/XMLTestParser.py")
#If we're in the test environment, check and see if we're being asked for
#a specific version of some package. If so, we'll provide a direct path
#instead of counting on CMake to choose the right version.
IF((NOT Included) AND ${Package} MATCHES "stat")
SET(ITK_DIR "/home/tester/ITK3.20.0/bin-review-stats")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "stat")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*4")
SET(ITK_DIR "/home/tester/ITKv4.0b01/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*4")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]20")
SET(ITK_DIR "/home/tester/ITK3.20.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]20")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]18")
SET(ITK_DIR "/home/tester/ITK3.18.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]18")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]16")
SET(ITK_DIR "/home/tester/ITK3.16.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]16")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]14")
SET(ITK_DIR "/home/tester/ITK3.14.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]14")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]12")
SET(ITK_DIR "/home/tester/ITK3.12.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]12")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]10")
SET(ITK_DIR "/home/tester/ITK3.10.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]10")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]8")
SET(ITK_DIR "/home/tester/ITK3.8.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]8")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]6")
SET(ITK_DIR "/home/tester/ITK3.6.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]6")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]4")
SET(ITK_DIR "/home/tester/ITK3.4.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]4")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]2")
SET(ITK_DIR "/home/tester/ITK3.2.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*3[.]2")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*2[.]8[.]1$")
SET(ITK_DIR "/home/tester/ITK2.8.1/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*2[.]8[.]1$")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*2[.]4[.]1$")
SET(ITK_DIR "/home/tester/ITK-2-4-1/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*2[.]4[.]1$")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*2[.]2[.]1$")
SET(ITK_DIR "/home/tester/ITK2.2.1/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*2[.]2[.]1$")
IF((NOT Included) AND ${Package} MATCHES "^ITK.*1[.]8[.]1$")
SET(ITK_DIR "/home/tester/ITK1.8.1/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK.*1[.]8[.]1$")
IF((NOT Included) AND ${Package} MATCHES "^VTK.*4[.]4$")
SET(VTK_DIR "/home/tester/VTK4.4/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindVTK.cmake")
INCLUDE(${VTK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^VTK.*4[.]4$")
IF((NOT Included) AND ${Package} MATCHES "^VTK.*5[.]0$")
SET(VTK_DIR "/home/tester/VTK5.0/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindVTK.cmake")
INCLUDE(${VTK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^VTK.*5[.]0$")
IF((NOT Included) AND ${Package} MATCHES "^VTK.*5[.]4$")
SET(VTK_DIR "/home/tester/VTK-5-4/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindVTK.cmake")
INCLUDE(${VTK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^VTK.*5[.]4$")
IF((NOT Included) AND ${Package} MATCHES "^VTK.*5[.]6$")
SET(VTK_DIR "/home/tester/VTK-5-6/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindVTK.cmake")
INCLUDE(${VTK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^VTK.*5[.]6$")
IF((NOT Included) AND ${Package} MATCHES "KWWidgets")
SET(KWWidgets_DIR "/home/tester/KWWidgets/bin")
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "KWWidgets")
#If we get this far and we still haven't found a match, set it up so the
#tester will by default use the most current version of the toolkit
IF((NOT Included) AND ${Package} MATCHES "^VTK")
SET(VTK_DIR "/home/tester/VTK-5-6/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindVTK.cmake")
INCLUDE(${VTK_USE_FILE})
SET(Included TRUE)
ENDIF((NOT Included) AND ${Package} MATCHES "^VTK")
IF((NOT Included) AND ${Package} MATCHES "^ITK")
SET(ITK_DIR "/home/tester/ITKv4.0b01/bin")
INCLUDE("/usr/local/share/CMake/Modules/FindITK.cmake")
INCLUDE(${ITK_USE_FILE})
SET(Included TRUE)
MESSAGE(${ITK_DIR})
ENDIF((NOT Included) AND ${Package} MATCHES "^ITK")
#if we're not in the testing environment, and a specific version is being
#specified, reset the variable to just be the name of the package
ELSE(EXISTS "/home/tester/XMLTestParser.py")
IF("${Package}" MATCHES "^ITK.*")
SET(PackageVar "ITK")
ENDIF("${Package}" MATCHES "^ITK.*")
IF(${Package} MATCHES "^VTK[0-9]")
SET(PackageVar "VTK")
ENDIF(${Package} MATCHES "^VTK[0-9]")
ENDIF(EXISTS "/home/tester/XMLTestParser.py")
#no point in executing the code below if we already found the package we're
#looking for.
IF(NOT Included)
FIND_PACKAGE(${PackageVar})
IF(${PackageVar}_FOUND)
#most packages define a PackageVar_INCLUDE_DIR variable, so we'll check for
#that first
IF(${PackageVar}_INCLUDE_DIR)
INCLUDE(${${PackageVar}_INCLUDE_DIR})
SET(Included TRUE)
ELSE(${PackageVar}_INCLUDE_DIR)
#VTK and ITK prefer to define a PackageVar_USE_FILE, so we need to look for
#that too
IF(${PackageVar}_USE_FILE)
INCLUDE(${${PackageVar}_USE_FILE})
SET(Included TRUE)
ENDIF(${PackageVar}_USE_FILE)
ENDIF(${PackageVar}_INCLUDE_DIR)
#then there's some other pesky packages that don't like to define standard
#variables at all. If you're trying to include one of those you might have
#to do a little bit of investigating on your own.
IF((NOT Included))
MESSAGE(FATAL_ERROR "${PackageVar} was found, but couldn't be included.\n
Try including it manually out of the FOREACH in the CMakeLists file.\n
Look at Find${PackageVar}.cmake in the CMake module directory for clues
on what you're supposed to include. Good luck.")
ENDIF((NOT Included))
ENDIF(${PackageVar}_FOUND)
ENDIF(NOT Included)
ENDMACRO(LOADPACKAGE)