ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/CMakeLists.txt
Revision: 1.53
Committed: Thu Jul 24 01:24:01 2025 UTC (2 weeks, 2 days ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.52: +2 -0 lines
Log Message:
chore: Added version string to all CMakeLists.txt files

File Contents

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