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