ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/CMakeLists.txt
Revision: 1.31
Committed: Fri Jul 19 02:18:44 2019 UTC (4 years, 9 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.30: +3 -0 lines
Log Message:
Created rcode_norm tool for encoding & decoding 32-bit surface normal maps

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 #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 depthcodec.c)
71 target_link_libraries(rcode_depth rtrad)
72
73 add_executable(rcode_norm rcode_norm.c normcodec.c)
74 target_link_libraries(rcode_norm rtrad)
75
76 if(X11_FOUND)
77 add_executable(xglaresrc
78 xglaresrc.c
79 "${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c"
80 )
81 target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES})
82 install(TARGETS xglaresrc
83 RUNTIME DESTINATION "bin"
84 )
85 endif()
86
87 #glrad needs to link against OpenGL libraries
88 if(APPLE)
89 find_library(OPENGL_gl_LIBRARY
90 NAMES GL MesaGL
91 PATHS ${X11_LIB_SEARCH_PATH}
92 )
93 find_library(OPENGL_glu_LIBRARY
94 NAMES GLU MesaGLU
95 PATHS ${X11_LIB_SEARCH_PATH}
96 )
97 set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
98 else()
99 find_package(OpenGL REQUIRED)
100 include_directories(${OPENGL_INCLUDE_DIR})
101 endif()
102
103 #check if we have SGIStereo.h
104 find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR})
105 if(NOT HAVE_SGISTEREO_H)
106 add_definitions(-DNOSTEREO)
107 endif()
108 if(UNIX AND X11_FOUND)
109 add_executable(glrad glrad.c)
110 target_link_libraries(glrad rgl rtrad ${OPENGL_LIBRARIES} ${X11_LIBRARIES})
111 install(TARGETS glrad
112 RUNTIME DESTINATION "bin"
113 )
114 if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
115 target_link_libraries(glrad rt)
116 endif()
117 endif()
118
119 if(UNIX)
120 install(TARGETS rpiece
121 RUNTIME DESTINATION "bin"
122 )
123 endif()
124
125 install(TARGETS
126 dctimestep
127 eplus_adduvf
128 evalglare
129 findglare
130 getinfo
131 glarendx
132 rad
133 radcompare
134 ranimate
135 ranimove
136 rcollate
137 rfluxmtx
138 rmtxop
139 rsensor
140 rttree_reduce
141 vwrays
142 vwright
143 wrapBSDF
144 RUNTIME DESTINATION "bin"
145 )
146
147 file(COPY
148 ambpos.cal
149 disk2square.cal
150 klems_full.cal
151 klems_half.cal
152 klems_quarter.cal
153 minimalBSDFt.xml
154 rambpos.cal
155 reinhartb.cal
156 tregsamp.dat
157 WINDOW6BSDFt.xml
158 DESTINATION "${CMAKE_BINARY_DIR}/lib"
159 )
160
161 if(WIN32)
162 install(PROGRAMS
163 bsdfview.pl
164 genBSDF.pl
165 genklemsamp.pl
166 genskyvec.pl
167 ltpict.pl
168 ltview.pl
169 objpict.pl
170 objview.pl
171 DESTINATION "bin"
172 )
173 else()
174 install_without_extension(
175 bsdfview.pl
176 compamb.csh
177 dayfact.csh
178 fieldcomb.csh
179 genBSDF.pl
180 genambpos.csh
181 genklemsamp.pl
182 genskyvec.pl
183 glare.csh
184 ltpict.pl
185 ltview.pl
186 objline.csh
187 objpict.pl
188 objview.pl
189 raddepend.csh
190 rlux.csh
191 rtpict.pl
192 trad.wsh
193 vinfo.csh
194 )
195 endif()