ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/CMakeLists.txt
Revision: 1.48
Committed: Tue Dec 12 16:31:45 2023 UTC (4 months, 1 week ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.47: +3 -3 lines
Log Message:
chore(rcomb): Renamed rmtxcomb to simpler "rcomb"

File Contents

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