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 |
if(WIN32) |
20 |
set(netproc_SOURCES win_netproc.c) |
21 |
else() |
22 |
set(netproc_SOURCES netproc.c) |
23 |
endif() |
24 |
|
25 |
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 |
#the next few libraries all need to include header files from the rt directory |
38 |
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../rt") |
39 |
|
40 |
add_executable(ranimove ranimove.c ranimove1.c ranimove2.c) |
41 |
target_link_libraries(ranimove raycalls radiance rtrad) |
42 |
|
43 |
add_executable(rsensor rsensor.c) |
44 |
target_link_libraries(rsensor raycalls radiance rtrad) |
45 |
|
46 |
add_executable(rttree_reduce rttree_reduce.c) |
47 |
target_link_libraries(rttree_reduce rtrad) |
48 |
|
49 |
add_executable(rcollate rcollate.c) |
50 |
target_link_libraries(rcollate rtrad) |
51 |
|
52 |
add_executable(rmtxop rmtxop.c rmatrix.c cmbsdf.c cmatrix.c) |
53 |
target_link_libraries(rmtxop rtrad) |
54 |
|
55 |
add_executable(wrapBSDF wrapBSDF.c) |
56 |
target_link_libraries(wrapBSDF rtrad) |
57 |
|
58 |
add_executable(eplus_adduvf eplus_adduvf.c eplus_idf.c) |
59 |
target_link_libraries(eplus_adduvf rtrad) |
60 |
|
61 |
add_executable(rfluxmtx rfluxmtx.c) |
62 |
target_link_libraries(rfluxmtx rtrad) |
63 |
|
64 |
add_executable(evalglare evalglare.c pictool.c) |
65 |
target_link_libraries(evalglare rtrad libreetz) |
66 |
|
67 |
add_executable(radcompare radcompare.c) |
68 |
target_link_libraries(radcompare rtrad) |
69 |
|
70 |
add_executable(rcode_depth rcode_depth.c) |
71 |
target_link_libraries(rcode_depth rtrad) |
72 |
|
73 |
add_executable(rcode_norm rcode_norm.c) |
74 |
target_link_libraries(rcode_norm rtrad) |
75 |
|
76 |
add executable(rcode_ident rcode_ident.c) |
77 |
target_link_libraries(rcode_ident rtrad) |
78 |
|
79 |
if(X11_FOUND) |
80 |
add_executable(xglaresrc |
81 |
xglaresrc.c |
82 |
"${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c" |
83 |
) |
84 |
target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES}) |
85 |
install(TARGETS xglaresrc |
86 |
RUNTIME DESTINATION "bin" |
87 |
) |
88 |
endif() |
89 |
|
90 |
#glrad needs to link against OpenGL libraries |
91 |
if(APPLE) |
92 |
find_library(OPENGL_gl_LIBRARY |
93 |
NAMES GL MesaGL |
94 |
PATHS ${X11_LIB_SEARCH_PATH} |
95 |
) |
96 |
find_library(OPENGL_glu_LIBRARY |
97 |
NAMES GLU MesaGLU |
98 |
PATHS ${X11_LIB_SEARCH_PATH} |
99 |
) |
100 |
set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) |
101 |
else() |
102 |
find_package(OpenGL REQUIRED) |
103 |
include_directories(${OPENGL_INCLUDE_DIR}) |
104 |
endif() |
105 |
|
106 |
#check if we have SGIStereo.h |
107 |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
108 |
if(NOT HAVE_SGISTEREO_H) |
109 |
add_definitions(-DNOSTEREO) |
110 |
endif() |
111 |
if(UNIX AND X11_FOUND) |
112 |
add_executable(glrad glrad.c) |
113 |
target_link_libraries(glrad rgl rtrad ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
114 |
install(TARGETS glrad |
115 |
RUNTIME DESTINATION "bin" |
116 |
) |
117 |
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") |
118 |
target_link_libraries(glrad rt) |
119 |
endif() |
120 |
endif() |
121 |
|
122 |
if(UNIX) |
123 |
install(TARGETS rpiece |
124 |
RUNTIME DESTINATION "bin" |
125 |
) |
126 |
endif() |
127 |
|
128 |
install(TARGETS |
129 |
dctimestep |
130 |
eplus_adduvf |
131 |
evalglare |
132 |
findglare |
133 |
getinfo |
134 |
glarendx |
135 |
rad |
136 |
radcompare |
137 |
ranimate |
138 |
ranimove |
139 |
rcollate |
140 |
rfluxmtx |
141 |
rmtxop |
142 |
rsensor |
143 |
rttree_reduce |
144 |
vwrays |
145 |
vwright |
146 |
wrapBSDF |
147 |
RUNTIME DESTINATION "bin" |
148 |
) |
149 |
|
150 |
file(COPY |
151 |
ambpos.cal |
152 |
disk2square.cal |
153 |
klems_full.cal |
154 |
klems_half.cal |
155 |
klems_quarter.cal |
156 |
minimalBSDFt.xml |
157 |
rambpos.cal |
158 |
reinhartb.cal |
159 |
tregsamp.dat |
160 |
WINDOW6BSDFt.xml |
161 |
DESTINATION "${CMAKE_BINARY_DIR}/lib" |
162 |
) |
163 |
|
164 |
if(WIN32) |
165 |
install(PROGRAMS |
166 |
bsdfview.pl |
167 |
genBSDF.pl |
168 |
genklemsamp.pl |
169 |
genskyvec.pl |
170 |
ltpict.pl |
171 |
ltview.pl |
172 |
objpict.pl |
173 |
objview.pl |
174 |
DESTINATION "bin" |
175 |
) |
176 |
else() |
177 |
install_without_extension( |
178 |
bsdfview.pl |
179 |
compamb.csh |
180 |
dayfact.csh |
181 |
fieldcomb.csh |
182 |
genBSDF.pl |
183 |
genambpos.csh |
184 |
genklemsamp.pl |
185 |
genskyvec.pl |
186 |
glare.csh |
187 |
ltpict.pl |
188 |
ltview.pl |
189 |
objline.csh |
190 |
objpict.pl |
191 |
objview.pl |
192 |
raddepend.csh |
193 |
rcode2bmp.pl |
194 |
rlux.csh |
195 |
rtpict.pl |
196 |
trad.wsh |
197 |
vinfo.csh |
198 |
) |
199 |
endif() |