| 1 |
|
set(VERSION_FILE "${radiance_BINARY_DIR}/src/util/Version.c") |
| 2 |
< |
add_custom_command( |
| 3 |
< |
OUTPUT "${VERSION_FILE}" |
| 4 |
< |
DEPENDS "${radiance_SOURCE_DIR}/src/rt/VERSION" |
| 5 |
< |
COMMAND "${CMAKE_COMMAND}" |
| 6 |
< |
-DVERSION_OUT_FILE="${VERSION_FILE}" |
| 7 |
< |
-DVERSION_IN_FILE="${radiance_SOURCE_DIR}/src/rt/VERSION" |
| 8 |
< |
-P "${radiance_SOURCE_DIR}/src/rt/create_version.cmake" |
| 9 |
< |
) |
| 2 |
> |
create_version_file("${VERSION_FILE}") |
| 3 |
|
|
| 4 |
< |
add_executable(dctimestep dctimestep.c) |
| 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) |
| 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 |
|
|
| 36 |
– |
add_executable(rtcontrib |
| 37 |
– |
rtcontrib.c "${VERSION_FILE}") |
| 38 |
– |
target_link_libraries(rtcontrib rtrad) |
| 39 |
– |
|
| 31 |
|
add_executable(vwrays vwrays.c) |
| 32 |
|
target_link_libraries(vwrays rtrad) |
| 33 |
|
|
| 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) |
| 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) |
| 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 |
|
if(X11_FOUND) |
| 68 |
|
add_executable(xglaresrc |
| 69 |
< |
xglaresrc.c ${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c) |
| 69 |
> |
xglaresrc.c |
| 70 |
> |
"${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c" |
| 71 |
> |
) |
| 72 |
|
target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES}) |
| 73 |
< |
install(TARGETS xglaresrc RUNTIME DESTINATION bin) |
| 73 |
> |
install(TARGETS xglaresrc |
| 74 |
> |
RUNTIME DESTINATION "bin" |
| 75 |
> |
) |
| 76 |
|
endif() |
| 77 |
|
|
| 78 |
< |
find_library(LIB_RGL "rgl" DOC "Path to librgl") |
| 79 |
< |
if(LIB_RGL) |
| 80 |
< |
#glrad needs to be able to include OpenGL headers |
| 78 |
> |
#glrad needs to link against OpenGL libraries |
| 79 |
> |
if(APPLE) |
| 80 |
> |
find_library(OPENGL_gl_LIBRARY |
| 81 |
> |
NAMES GL MesaGL |
| 82 |
> |
PATHS /usr/X11R6/lib |
| 83 |
> |
) |
| 84 |
> |
find_library(OPENGL_glu_LIBRARY |
| 85 |
> |
NAMES GLU MesaGLU |
| 86 |
> |
PATHS /usr/X11R6/lib |
| 87 |
> |
) |
| 88 |
> |
set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) |
| 89 |
> |
else() |
| 90 |
> |
find_package(OpenGL REQUIRED) |
| 91 |
|
include_directories(${OPENGL_INCLUDE_DIR}) |
| 92 |
+ |
endif() |
| 93 |
|
|
| 94 |
< |
#check if we have SGIStereo.h |
| 95 |
< |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
| 96 |
< |
if(NOT HAVE_SGISTEREO_H) |
| 97 |
< |
add_definitions(-DNOSTEREO) |
| 94 |
> |
#check if we have SGIStereo.h |
| 95 |
> |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
| 96 |
> |
if(NOT HAVE_SGISTEREO_H) |
| 97 |
> |
add_definitions(-DNOSTEREO) |
| 98 |
> |
endif() |
| 99 |
> |
if(UNIX AND X11_FOUND) |
| 100 |
> |
add_executable(glrad glrad.c) |
| 101 |
> |
target_link_libraries(glrad rgl rtrad ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
| 102 |
> |
install(TARGETS glrad |
| 103 |
> |
RUNTIME DESTINATION "bin" |
| 104 |
> |
) |
| 105 |
> |
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") |
| 106 |
> |
target_link_libraries(glrad rt) |
| 107 |
|
endif() |
| 108 |
+ |
endif() |
| 109 |
|
|
| 110 |
< |
add_executable(glrad glrad.c) |
| 111 |
< |
target_link_libraries(glrad |
| 112 |
< |
rtrad ${LIB_RGL} ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
| 113 |
< |
install(TARGETS glrad RUNTIME DESTINATION bin) |
| 110 |
> |
if(UNIX) |
| 111 |
> |
install(TARGETS rpiece |
| 112 |
> |
RUNTIME DESTINATION "bin" |
| 113 |
> |
) |
| 114 |
|
endif() |
| 115 |
|
|
| 116 |
< |
install(TARGETS dctimestep findglare getinfo glarendx rad ranimate rpiece |
| 117 |
< |
rtcontrib vwrays vwright ranimove rsensor |
| 118 |
< |
RUNTIME DESTINATION bin) |
| 119 |
< |
install(FILES objview.csh objpict.csh glare.csh dayfact.csh rlux.csh |
| 120 |
< |
raddepend.csh trad.wsh objline.csh compamb.csh vinfo.csh |
| 121 |
< |
genambpos.csh fieldcomb.csh genklemsamp.pl genskyvec.pl |
| 122 |
< |
genBSDF.pl tregsamp.dat |
| 123 |
< |
DESTINATION bin) |
| 116 |
> |
install(TARGETS |
| 117 |
> |
dctimestep |
| 118 |
> |
eplus_adduvf |
| 119 |
> |
evalglare |
| 120 |
> |
findglare |
| 121 |
> |
getinfo |
| 122 |
> |
glarendx |
| 123 |
> |
rad |
| 124 |
> |
ranimate |
| 125 |
> |
ranimove |
| 126 |
> |
rcollate |
| 127 |
> |
rfluxmtx |
| 128 |
> |
rmtxop |
| 129 |
> |
rsensor |
| 130 |
> |
rttree_reduce |
| 131 |
> |
vwrays |
| 132 |
> |
vwright |
| 133 |
> |
wrapBSDF |
| 134 |
> |
RUNTIME DESTINATION "bin" |
| 135 |
> |
) |
| 136 |
> |
|
| 137 |
> |
file(COPY |
| 138 |
> |
ambpos.cal |
| 139 |
> |
disk2square.cal |
| 140 |
> |
klems_full.cal |
| 141 |
> |
klems_half.cal |
| 142 |
> |
klems_quarter.cal |
| 143 |
> |
minimalBSDFt.xml |
| 144 |
> |
rambpos.cal |
| 145 |
> |
reinhartb.cal |
| 146 |
> |
tregsamp.dat |
| 147 |
> |
WINDOW6BSDFt.xml |
| 148 |
> |
DESTINATION "${CMAKE_BINARY_DIR}/lib" |
| 149 |
> |
) |
| 150 |
> |
|
| 151 |
> |
if(WIN32) |
| 152 |
> |
install(PROGRAMS |
| 153 |
> |
bsdfview.pl |
| 154 |
> |
genBSDF.pl |
| 155 |
> |
genklemsamp.pl |
| 156 |
> |
genskyvec.pl |
| 157 |
> |
ltpict.pl |
| 158 |
> |
ltview.pl |
| 159 |
> |
objpict.pl |
| 160 |
> |
objview.pl |
| 161 |
> |
DESTINATION "bin" |
| 162 |
> |
) |
| 163 |
> |
else() |
| 164 |
> |
install_without_extension( |
| 165 |
> |
bsdfview.pl |
| 166 |
> |
compamb.csh |
| 167 |
> |
dayfact.csh |
| 168 |
> |
fieldcomb.csh |
| 169 |
> |
genBSDF.pl |
| 170 |
> |
genambpos.csh |
| 171 |
> |
genklemsamp.pl |
| 172 |
> |
genskyvec.pl |
| 173 |
> |
glare.csh |
| 174 |
> |
ltpict.pl |
| 175 |
> |
ltview.pl |
| 176 |
> |
objline.csh |
| 177 |
> |
objpict.pl |
| 178 |
> |
objview.pl |
| 179 |
> |
raddepend.csh |
| 180 |
> |
rlux.csh |
| 181 |
> |
trad.wsh |
| 182 |
> |
vinfo.csh |
| 183 |
> |
) |
| 184 |
> |
endif() |