ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/CMakeLists.txt
Revision: 1.37
Committed: Thu Jul 16 19:57:29 2020 UTC (3 years, 9 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.36: +4 -0 lines
Log Message:
fix(dcglare,rcode_depth,rcode_ident,rcode_norm): added missing installer targets

File Contents

# Content
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 add_executable(dcglare dcglare.c cmbsdf.c cmatrix.c cmglare.c)
38 target_link_libraries(dcglare rtrad)
39
40 #the next few libraries all need to include header files from the rt directory
41 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../rt")
42
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 add_executable(rttree_reduce rttree_reduce.c)
50 target_link_libraries(rttree_reduce rtrad)
51
52 add_executable(rcollate rcollate.c)
53 target_link_libraries(rcollate rtrad)
54
55 add_executable(rmtxop rmtxop.c rmatrix.c cmbsdf.c cmatrix.c)
56 target_link_libraries(rmtxop rtrad)
57
58 add_executable(wrapBSDF wrapBSDF.c)
59 target_link_libraries(wrapBSDF rtrad)
60
61 add_executable(eplus_adduvf eplus_adduvf.c eplus_idf.c)
62 target_link_libraries(eplus_adduvf rtrad)
63
64 add_executable(rfluxmtx rfluxmtx.c)
65 target_link_libraries(rfluxmtx rtrad)
66
67 add_executable(evalglare evalglare.c pictool.c)
68 target_link_libraries(evalglare rtrad libreetz)
69
70 add_executable(radcompare radcompare.c)
71 target_link_libraries(radcompare rtrad)
72
73 add_executable(rcode_depth rcode_depth.c)
74 target_link_libraries(rcode_depth rtrad)
75
76 add_executable(rcode_norm rcode_norm.c)
77 target_link_libraries(rcode_norm rtrad)
78
79 add_executable(rcode_ident rcode_ident.c)
80 target_link_libraries(rcode_ident rtrad)
81
82 if(X11_FOUND)
83 add_executable(xglaresrc
84 xglaresrc.c
85 "${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c"
86 )
87 target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES})
88 install(TARGETS xglaresrc
89 RUNTIME DESTINATION "bin"
90 )
91 endif()
92
93 #glrad needs to link against OpenGL libraries
94 if(APPLE)
95 find_library(OPENGL_gl_LIBRARY
96 NAMES GL MesaGL
97 PATHS ${X11_LIB_SEARCH_PATH}
98 )
99 find_library(OPENGL_glu_LIBRARY
100 NAMES GLU MesaGLU
101 PATHS ${X11_LIB_SEARCH_PATH}
102 )
103 set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
104 else()
105 find_package(OpenGL REQUIRED)
106 include_directories(${OPENGL_INCLUDE_DIR})
107 endif()
108
109 #check if we have SGIStereo.h
110 find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR})
111 if(NOT HAVE_SGISTEREO_H)
112 add_definitions(-DNOSTEREO)
113 endif()
114 if(UNIX AND X11_FOUND)
115 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 if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
121 target_link_libraries(glrad rt)
122 endif()
123 endif()
124
125 if(UNIX)
126 install(TARGETS rpiece
127 RUNTIME DESTINATION "bin"
128 )
129 endif()
130
131 install(TARGETS
132 dcglare
133 dctimestep
134 eplus_adduvf
135 evalglare
136 findglare
137 getinfo
138 glarendx
139 rad
140 radcompare
141 ranimate
142 ranimove
143 rcode_depth
144 rcode_ident
145 rcode_norm
146 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
171 if(WIN32)
172 install(PROGRAMS
173 bsdfview.pl
174 genBSDF.pl
175 genklemsamp.pl
176 genskyvec.pl
177 ltpict.pl
178 ltview.pl
179 objpict.pl
180 objview.pl
181 DESTINATION "bin"
182 )
183 else()
184 install_without_extension(
185 bsdfview.pl
186 compamb.csh
187 dayfact.csh
188 fieldcomb.csh
189 genBSDF.pl
190 genambpos.csh
191 genklemsamp.pl
192 genskyvec.pl
193 glare.csh
194 ltpict.pl
195 ltview.pl
196 objline.csh
197 objpict.pl
198 objview.pl
199 raddepend.csh
200 rcode2bmp.pl
201 rlux.csh
202 rtpict.pl
203 trad.wsh
204 vinfo.csh
205 )
206 endif()