1 |
greg |
1.1 |
set(VERSION_FILE "${radiance_BINARY_DIR}/src/util/Version.c") |
2 |
greg |
1.3 |
create_version_file("${VERSION_FILE}") |
3 |
greg |
1.1 |
|
4 |
greg |
1.12 |
add_executable(dctimestep dctimestep.c cmbsdf.c cmatrix.c) |
5 |
greg |
1.1 |
target_link_libraries(dctimestep rtrad) |
6 |
|
|
|
7 |
|
|
add_executable(findglare findglare.c glareval.c glaresrc.c setscan.c) |
8 |
|
|
target_link_libraries(findglare rtrad) |
9 |
|
|
|
10 |
|
|
add_executable(getinfo getinfo.c) |
11 |
|
|
target_link_libraries(getinfo rtrad) |
12 |
|
|
|
13 |
|
|
add_executable(glarendx glarendx.c) |
14 |
|
|
target_link_libraries(glarendx rtrad) |
15 |
|
|
|
16 |
|
|
add_executable(rad rad.c) |
17 |
|
|
target_link_libraries(rad rtrad) |
18 |
greg |
1.25 |
|
19 |
greg |
1.1 |
if(WIN32) |
20 |
|
|
set(netproc_SOURCES win_netproc.c) |
21 |
|
|
else() |
22 |
|
|
set(netproc_SOURCES netproc.c) |
23 |
|
|
endif() |
24 |
greg |
1.25 |
|
25 |
greg |
1.1 |
add_executable(ranimate ranimate.c ${netproc_SOURCES}) |
26 |
|
|
target_link_libraries(ranimate rtrad) |
27 |
|
|
|
28 |
|
|
add_executable(rpiece rpiece.c "${VERSION_FILE}") |
29 |
|
|
target_link_libraries(rpiece rtrad) |
30 |
|
|
|
31 |
|
|
add_executable(vwrays vwrays.c) |
32 |
|
|
target_link_libraries(vwrays rtrad) |
33 |
|
|
|
34 |
|
|
add_executable(vwright vwright.c) |
35 |
|
|
target_link_libraries(vwright rtrad) |
36 |
|
|
|
37 |
greg |
1.36 |
add_executable(dcglare dcglare.c cmbsdf.c cmatrix.c cmglare.c) |
38 |
|
|
target_link_libraries(dcglare rtrad) |
39 |
|
|
|
40 |
greg |
1.1 |
#the next few libraries all need to include header files from the rt directory |
41 |
greg |
1.25 |
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../rt") |
42 |
greg |
1.1 |
|
43 |
|
|
add_executable(ranimove ranimove.c ranimove1.c ranimove2.c) |
44 |
|
|
target_link_libraries(ranimove raycalls radiance rtrad) |
45 |
|
|
|
46 |
|
|
add_executable(rsensor rsensor.c) |
47 |
|
|
target_link_libraries(rsensor raycalls radiance rtrad) |
48 |
|
|
|
49 |
greg |
1.8 |
add_executable(rttree_reduce rttree_reduce.c) |
50 |
|
|
target_link_libraries(rttree_reduce rtrad) |
51 |
|
|
|
52 |
greg |
1.10 |
add_executable(rcollate rcollate.c) |
53 |
|
|
target_link_libraries(rcollate rtrad) |
54 |
|
|
|
55 |
greg |
1.18 |
add_executable(rmtxop rmtxop.c rmatrix.c cmbsdf.c cmatrix.c) |
56 |
|
|
target_link_libraries(rmtxop rtrad) |
57 |
|
|
|
58 |
greg |
1.20 |
add_executable(wrapBSDF wrapBSDF.c) |
59 |
|
|
target_link_libraries(wrapBSDF rtrad) |
60 |
|
|
|
61 |
greg |
1.13 |
add_executable(eplus_adduvf eplus_adduvf.c eplus_idf.c) |
62 |
|
|
target_link_libraries(eplus_adduvf rtrad) |
63 |
|
|
|
64 |
greg |
1.19 |
add_executable(rfluxmtx rfluxmtx.c) |
65 |
|
|
target_link_libraries(rfluxmtx rtrad) |
66 |
|
|
|
67 |
greg |
1.22 |
add_executable(evalglare evalglare.c pictool.c) |
68 |
|
|
target_link_libraries(evalglare rtrad libreetz) |
69 |
|
|
|
70 |
greg |
1.29 |
add_executable(radcompare radcompare.c) |
71 |
|
|
target_link_libraries(radcompare rtrad) |
72 |
|
|
|
73 |
greg |
1.34 |
add_executable(rcode_depth rcode_depth.c) |
74 |
greg |
1.30 |
target_link_libraries(rcode_depth rtrad) |
75 |
|
|
|
76 |
greg |
1.34 |
add_executable(rcode_norm rcode_norm.c) |
77 |
greg |
1.31 |
target_link_libraries(rcode_norm rtrad) |
78 |
|
|
|
79 |
greg |
1.35 |
add_executable(rcode_ident rcode_ident.c) |
80 |
greg |
1.32 |
target_link_libraries(rcode_ident rtrad) |
81 |
|
|
|
82 |
greg |
1.1 |
if(X11_FOUND) |
83 |
|
|
add_executable(xglaresrc |
84 |
greg |
1.25 |
xglaresrc.c |
85 |
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c" |
86 |
|
|
) |
87 |
greg |
1.1 |
target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES}) |
88 |
greg |
1.25 |
install(TARGETS xglaresrc |
89 |
|
|
RUNTIME DESTINATION "bin" |
90 |
|
|
) |
91 |
greg |
1.1 |
endif() |
92 |
|
|
|
93 |
greg |
1.4 |
#glrad needs to link against OpenGL libraries |
94 |
|
|
if(APPLE) |
95 |
|
|
find_library(OPENGL_gl_LIBRARY |
96 |
|
|
NAMES GL MesaGL |
97 |
greg |
1.28 |
PATHS ${X11_LIB_SEARCH_PATH} |
98 |
greg |
1.4 |
) |
99 |
|
|
find_library(OPENGL_glu_LIBRARY |
100 |
|
|
NAMES GLU MesaGLU |
101 |
greg |
1.28 |
PATHS ${X11_LIB_SEARCH_PATH} |
102 |
greg |
1.4 |
) |
103 |
|
|
set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) |
104 |
|
|
else() |
105 |
|
|
find_package(OpenGL REQUIRED) |
106 |
greg |
1.1 |
include_directories(${OPENGL_INCLUDE_DIR}) |
107 |
greg |
1.4 |
endif() |
108 |
greg |
1.1 |
|
109 |
greg |
1.25 |
#check if we have SGIStereo.h |
110 |
greg |
1.4 |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
111 |
|
|
if(NOT HAVE_SGISTEREO_H) |
112 |
greg |
1.25 |
add_definitions(-DNOSTEREO) |
113 |
greg |
1.4 |
endif() |
114 |
greg |
1.14 |
if(UNIX AND X11_FOUND) |
115 |
greg |
1.25 |
add_executable(glrad glrad.c) |
116 |
|
|
target_link_libraries(glrad rgl rtrad ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
117 |
|
|
install(TARGETS glrad |
118 |
|
|
RUNTIME DESTINATION "bin" |
119 |
|
|
) |
120 |
greg |
1.5 |
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") |
121 |
|
|
target_link_libraries(glrad rt) |
122 |
|
|
endif() |
123 |
greg |
1.1 |
endif() |
124 |
greg |
1.23 |
|
125 |
|
|
if(UNIX) |
126 |
greg |
1.25 |
install(TARGETS rpiece |
127 |
|
|
RUNTIME DESTINATION "bin" |
128 |
|
|
) |
129 |
greg |
1.23 |
endif() |
130 |
|
|
|
131 |
greg |
1.25 |
install(TARGETS |
132 |
greg |
1.37 |
dcglare |
133 |
greg |
1.25 |
dctimestep |
134 |
|
|
eplus_adduvf |
135 |
|
|
evalglare |
136 |
|
|
findglare |
137 |
|
|
getinfo |
138 |
|
|
glarendx |
139 |
|
|
rad |
140 |
greg |
1.29 |
radcompare |
141 |
greg |
1.25 |
ranimate |
142 |
|
|
ranimove |
143 |
greg |
1.37 |
rcode_depth |
144 |
|
|
rcode_ident |
145 |
|
|
rcode_norm |
146 |
greg |
1.25 |
rcollate |
147 |
|
|
rfluxmtx |
148 |
|
|
rmtxop |
149 |
|
|
rsensor |
150 |
|
|
rttree_reduce |
151 |
|
|
vwrays |
152 |
|
|
vwright |
153 |
|
|
wrapBSDF |
154 |
|
|
RUNTIME DESTINATION "bin" |
155 |
|
|
) |
156 |
|
|
|
157 |
|
|
file(COPY |
158 |
|
|
ambpos.cal |
159 |
|
|
disk2square.cal |
160 |
|
|
klems_full.cal |
161 |
|
|
klems_half.cal |
162 |
|
|
klems_quarter.cal |
163 |
|
|
minimalBSDFt.xml |
164 |
|
|
rambpos.cal |
165 |
|
|
reinhartb.cal |
166 |
|
|
tregsamp.dat |
167 |
|
|
WINDOW6BSDFt.xml |
168 |
|
|
DESTINATION "${CMAKE_BINARY_DIR}/lib" |
169 |
|
|
) |
170 |
greg |
1.17 |
|
171 |
greg |
1.4 |
if(WIN32) |
172 |
greg |
1.38 |
add_custom_target(bsdfview ALL |
173 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/bsdfview.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/bsdfview.exe -d |
174 |
|
|
) |
175 |
|
|
add_custom_target(genBSDF ALL |
176 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/genBSDF.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/genBSDF.exe -d |
177 |
|
|
) |
178 |
|
|
add_custom_target(genklemsamp ALL |
179 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/genklemsamp.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/genklemsamp.exe -d |
180 |
|
|
) |
181 |
|
|
add_custom_target(genskyvec ALL |
182 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/genskyvec.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/genskyvec.exe -d |
183 |
|
|
) |
184 |
|
|
add_custom_target(ltpict ALL |
185 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/ltpict.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/ltpict.exe -d |
186 |
|
|
) |
187 |
|
|
add_custom_target(ltview ALL |
188 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/ltview.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/ltview.exe -d |
189 |
|
|
) |
190 |
|
|
add_custom_target(objpict ALL |
191 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/objpict.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/objpict.exe -d |
192 |
|
|
) |
193 |
|
|
add_custom_target(objview ALL |
194 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/objview.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/objview.exe -d |
195 |
|
|
) |
196 |
|
|
add_custom_target(genambpos ALL |
197 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/genambpos.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/genambpos.exe -d |
198 |
|
|
) |
199 |
|
|
add_custom_target(rcode2bmp ALL |
200 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/rcode2bmp.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/rcode2bmp.exe -d |
201 |
|
|
) |
202 |
|
|
add_custom_target(rtpict ALL |
203 |
|
|
COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/rtpict.pl -o ${CMAKE_CURRENT_SOURCE_DIR}/rtpict.exe -d |
204 |
|
|
) |
205 |
greg |
1.40 |
install(PROGRAMS |
206 |
greg |
1.38 |
bsdfview.exe |
207 |
|
|
genBSDF.exe |
208 |
|
|
genklemsamp.exe |
209 |
|
|
genskyvec.exe |
210 |
|
|
ltpict.exe |
211 |
|
|
ltview.exe |
212 |
|
|
objpict.exe |
213 |
|
|
objview.exe |
214 |
|
|
genambpos.exe |
215 |
|
|
rcode2bmp.exe |
216 |
|
|
rtpict.exe |
217 |
greg |
1.25 |
DESTINATION "bin" |
218 |
|
|
) |
219 |
greg |
1.4 |
else() |
220 |
greg |
1.25 |
install_without_extension( |
221 |
|
|
bsdfview.pl |
222 |
|
|
compamb.csh |
223 |
|
|
dayfact.csh |
224 |
|
|
fieldcomb.csh |
225 |
|
|
genBSDF.pl |
226 |
greg |
1.38 |
genambpos.pl |
227 |
greg |
1.25 |
genklemsamp.pl |
228 |
|
|
genskyvec.pl |
229 |
|
|
glare.csh |
230 |
|
|
ltpict.pl |
231 |
|
|
ltview.pl |
232 |
|
|
objline.csh |
233 |
|
|
objpict.pl |
234 |
|
|
objview.pl |
235 |
|
|
raddepend.csh |
236 |
greg |
1.33 |
rcode2bmp.pl |
237 |
greg |
1.25 |
rlux.csh |
238 |
greg |
1.26 |
rtpict.pl |
239 |
greg |
1.25 |
vinfo.csh |
240 |
|
|
) |
241 |
greg |
1.39 |
add_custom_target(trad ALL |
242 |
greg |
1.41 |
COMMAND csh -f ${CMAKE_CURRENT_SOURCE_DIR}/tradinstall.csh ../../build/bin ../../build/lib |
243 |
|
|
) |
244 |
|
|
install(FILES |
245 |
|
|
${CMAKE_BINARY_DIR}/bin/trad |
246 |
|
|
DESTINATION "bin" |
247 |
|
|
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ |
248 |
greg |
1.39 |
) |
249 |
greg |
1.4 |
endif() |