| 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.1 | if(WIN32) | 
| 20 |  |  | set(netproc_SOURCES win_netproc.c) | 
| 21 |  |  | else() | 
| 22 |  |  | set(netproc_SOURCES netproc.c) | 
| 23 |  |  | endif() | 
| 24 | greg | 1.25 |  | 
| 25 | greg | 1.1 | 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 | greg | 1.25 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../rt") | 
| 39 | greg | 1.1 |  | 
| 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 | greg | 1.8 | add_executable(rttree_reduce rttree_reduce.c) | 
| 47 |  |  | target_link_libraries(rttree_reduce rtrad) | 
| 48 |  |  |  | 
| 49 | greg | 1.10 | add_executable(rcollate rcollate.c) | 
| 50 |  |  | target_link_libraries(rcollate rtrad) | 
| 51 |  |  |  | 
| 52 | greg | 1.18 | add_executable(rmtxop rmtxop.c rmatrix.c cmbsdf.c cmatrix.c) | 
| 53 |  |  | target_link_libraries(rmtxop rtrad) | 
| 54 |  |  |  | 
| 55 | greg | 1.20 | add_executable(wrapBSDF wrapBSDF.c) | 
| 56 |  |  | target_link_libraries(wrapBSDF rtrad) | 
| 57 |  |  |  | 
| 58 | greg | 1.13 | add_executable(eplus_adduvf eplus_adduvf.c eplus_idf.c) | 
| 59 |  |  | target_link_libraries(eplus_adduvf rtrad) | 
| 60 |  |  |  | 
| 61 | greg | 1.19 | add_executable(rfluxmtx rfluxmtx.c) | 
| 62 |  |  | target_link_libraries(rfluxmtx rtrad) | 
| 63 |  |  |  | 
| 64 | greg | 1.22 | add_executable(evalglare evalglare.c pictool.c) | 
| 65 |  |  | target_link_libraries(evalglare rtrad libreetz) | 
| 66 |  |  |  | 
| 67 | greg | 1.29 | add_executable(radcompare radcompare.c) | 
| 68 |  |  | target_link_libraries(radcompare rtrad) | 
| 69 |  |  |  | 
| 70 | greg | 1.30 | add_executable(rcode_depth rcode_depth.c depthcodec.c) | 
| 71 |  |  | target_link_libraries(rcode_depth rtrad) | 
| 72 |  |  |  | 
| 73 | greg | 1.31 | add_executable(rcode_norm rcode_norm.c normcodec.c) | 
| 74 |  |  | target_link_libraries(rcode_norm rtrad) | 
| 75 |  |  |  | 
| 76 | greg | 1.32 | add executable(rcode_ident rcode_ident.c idmap.c) | 
| 77 |  |  | target_link_libraries(rcode_ident rtrad) | 
| 78 |  |  |  | 
| 79 | greg | 1.1 | if(X11_FOUND) | 
| 80 |  |  | add_executable(xglaresrc | 
| 81 | greg | 1.25 | xglaresrc.c | 
| 82 |  |  | "${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c" | 
| 83 |  |  | ) | 
| 84 | greg | 1.1 | target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES}) | 
| 85 | greg | 1.25 | install(TARGETS xglaresrc | 
| 86 |  |  | RUNTIME DESTINATION "bin" | 
| 87 |  |  | ) | 
| 88 | greg | 1.1 | endif() | 
| 89 |  |  |  | 
| 90 | greg | 1.4 | #glrad needs to link against OpenGL libraries | 
| 91 |  |  | if(APPLE) | 
| 92 |  |  | find_library(OPENGL_gl_LIBRARY | 
| 93 |  |  | NAMES GL MesaGL | 
| 94 | greg | 1.28 | PATHS ${X11_LIB_SEARCH_PATH} | 
| 95 | greg | 1.4 | ) | 
| 96 |  |  | find_library(OPENGL_glu_LIBRARY | 
| 97 |  |  | NAMES GLU MesaGLU | 
| 98 | greg | 1.28 | PATHS ${X11_LIB_SEARCH_PATH} | 
| 99 | greg | 1.4 | ) | 
| 100 |  |  | set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) | 
| 101 |  |  | else() | 
| 102 |  |  | find_package(OpenGL REQUIRED) | 
| 103 | greg | 1.1 | include_directories(${OPENGL_INCLUDE_DIR}) | 
| 104 | greg | 1.4 | endif() | 
| 105 | greg | 1.1 |  | 
| 106 | greg | 1.25 | #check if we have SGIStereo.h | 
| 107 | greg | 1.4 | find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) | 
| 108 |  |  | if(NOT HAVE_SGISTEREO_H) | 
| 109 | greg | 1.25 | add_definitions(-DNOSTEREO) | 
| 110 | greg | 1.4 | endif() | 
| 111 | greg | 1.14 | if(UNIX AND X11_FOUND) | 
| 112 | greg | 1.25 | 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 | greg | 1.5 | if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") | 
| 118 |  |  | target_link_libraries(glrad rt) | 
| 119 |  |  | endif() | 
| 120 | greg | 1.1 | endif() | 
| 121 | greg | 1.23 |  | 
| 122 |  |  | if(UNIX) | 
| 123 | greg | 1.25 | install(TARGETS rpiece | 
| 124 |  |  | RUNTIME DESTINATION "bin" | 
| 125 |  |  | ) | 
| 126 | greg | 1.23 | endif() | 
| 127 |  |  |  | 
| 128 | greg | 1.25 | install(TARGETS | 
| 129 |  |  | dctimestep | 
| 130 |  |  | eplus_adduvf | 
| 131 |  |  | evalglare | 
| 132 |  |  | findglare | 
| 133 |  |  | getinfo | 
| 134 |  |  | glarendx | 
| 135 |  |  | rad | 
| 136 | greg | 1.29 | radcompare | 
| 137 | greg | 1.25 | 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 | greg | 1.17 |  | 
| 164 | greg | 1.4 | if(WIN32) | 
| 165 | greg | 1.25 | 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 | greg | 1.4 | else() | 
| 177 | greg | 1.25 | 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 |  |  | rlux.csh | 
| 194 | greg | 1.26 | rtpict.pl | 
| 195 | greg | 1.25 | trad.wsh | 
| 196 |  |  | vinfo.csh | 
| 197 |  |  | ) | 
| 198 | greg | 1.4 | endif() |