| 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) |
| 26 |
|
add_executable(rpiece rpiece.c "${VERSION_FILE}") |
| 27 |
|
target_link_libraries(rpiece rtrad) |
| 28 |
|
|
| 36 |
– |
add_executable(rtcontrib |
| 37 |
– |
rtcontrib.c "${VERSION_FILE}") |
| 38 |
– |
target_link_libraries(rtcontrib rtrad) |
| 39 |
– |
|
| 29 |
|
add_executable(vwrays vwrays.c) |
| 30 |
|
target_link_libraries(vwrays rtrad) |
| 31 |
|
|
| 41 |
|
add_executable(rsensor rsensor.c) |
| 42 |
|
target_link_libraries(rsensor raycalls radiance rtrad) |
| 43 |
|
|
| 44 |
+ |
add_executable(rttree_reduce rttree_reduce.c) |
| 45 |
+ |
target_link_libraries(rttree_reduce rtrad) |
| 46 |
+ |
|
| 47 |
+ |
add_executable(rcollate rcollate.c) |
| 48 |
+ |
target_link_libraries(rcollate rtrad) |
| 49 |
+ |
|
| 50 |
+ |
add_executable(rmtxop rmtxop.c rmatrix.c cmbsdf.c cmatrix.c) |
| 51 |
+ |
target_link_libraries(rmtxop rtrad) |
| 52 |
+ |
|
| 53 |
+ |
add_executable(wrapBSDF wrapBSDF.c) |
| 54 |
+ |
target_link_libraries(wrapBSDF rtrad) |
| 55 |
+ |
|
| 56 |
+ |
add_executable(eplus_adduvf eplus_adduvf.c eplus_idf.c) |
| 57 |
+ |
target_link_libraries(eplus_adduvf rtrad) |
| 58 |
+ |
|
| 59 |
+ |
add_executable(rfluxmtx rfluxmtx.c) |
| 60 |
+ |
target_link_libraries(rfluxmtx rtrad) |
| 61 |
+ |
|
| 62 |
|
if(X11_FOUND) |
| 63 |
|
add_executable(xglaresrc |
| 64 |
|
xglaresrc.c ${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c) |
| 66 |
|
install(TARGETS xglaresrc RUNTIME DESTINATION bin) |
| 67 |
|
endif() |
| 68 |
|
|
| 69 |
< |
find_library(LIB_RGL "rgl" DOC "Path to librgl") |
| 70 |
< |
if(LIB_RGL) |
| 71 |
< |
#glrad needs to be able to include OpenGL headers |
| 69 |
> |
#glrad needs to link against OpenGL libraries |
| 70 |
> |
if(APPLE) |
| 71 |
> |
find_library(OPENGL_gl_LIBRARY |
| 72 |
> |
NAMES GL MesaGL |
| 73 |
> |
PATHS /usr/X11R6/lib |
| 74 |
> |
) |
| 75 |
> |
find_library(OPENGL_glu_LIBRARY |
| 76 |
> |
NAMES GLU MesaGLU |
| 77 |
> |
PATHS /usr/X11R6/lib |
| 78 |
> |
) |
| 79 |
> |
set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) |
| 80 |
> |
else() |
| 81 |
> |
find_package(OpenGL REQUIRED) |
| 82 |
|
include_directories(${OPENGL_INCLUDE_DIR}) |
| 83 |
+ |
endif() |
| 84 |
|
|
| 85 |
< |
#check if we have SGIStereo.h |
| 86 |
< |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
| 87 |
< |
if(NOT HAVE_SGISTEREO_H) |
| 88 |
< |
add_definitions(-DNOSTEREO) |
| 85 |
> |
#check if we have SGIStereo.h |
| 86 |
> |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
| 87 |
> |
if(NOT HAVE_SGISTEREO_H) |
| 88 |
> |
add_definitions(-DNOSTEREO) |
| 89 |
> |
endif() |
| 90 |
> |
if(UNIX AND X11_FOUND) |
| 91 |
> |
add_executable(glrad glrad.c) |
| 92 |
> |
target_link_libraries(glrad rgl rtrad ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
| 93 |
> |
install(TARGETS rpiece RUNTIME DESTINATION bin) |
| 94 |
> |
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") |
| 95 |
> |
target_link_libraries(glrad rt) |
| 96 |
|
endif() |
| 72 |
– |
|
| 73 |
– |
add_executable(glrad glrad.c) |
| 74 |
– |
target_link_libraries(glrad |
| 75 |
– |
rtrad ${LIB_RGL} ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
| 76 |
– |
install(TARGETS glrad RUNTIME DESTINATION bin) |
| 97 |
|
endif() |
| 98 |
+ |
install(TARGETS dctimestep findglare getinfo glarendx rad ranimate |
| 99 |
+ |
vwrays vwright ranimove rsensor rttree_reduce rcollate |
| 100 |
+ |
eplus_adduvf rfluxmtx rmtxop wrapBSDF |
| 101 |
+ |
RUNTIME DESTINATION bin) |
| 102 |
|
|
| 103 |
< |
install(TARGETS dctimestep findglare getinfo glarendx rad ranimate rpiece |
| 104 |
< |
rtcontrib vwrays vwright ranimove rsensor |
| 105 |
< |
RUNTIME DESTINATION bin) |
| 106 |
< |
install(FILES objview.csh objpict.csh glare.csh dayfact.csh rlux.csh |
| 107 |
< |
raddepend.csh trad.wsh objline.csh compamb.csh vinfo.csh |
| 108 |
< |
genambpos.csh fieldcomb.csh genklemsamp.pl genskyvec.pl |
| 109 |
< |
genBSDF.pl tregsamp.dat |
| 110 |
< |
DESTINATION bin) |
| 103 |
> |
install(FILES rambpos.cal ambpos.cal tregsamp.dat reinhartb.cal |
| 104 |
> |
klems_full.cal klems_half.cal klems_quarter.cal disk2square.cal |
| 105 |
> |
WINDOW6BSDFt.xml minimalBSDFt.xml |
| 106 |
> |
DESTINATION lib) |
| 107 |
> |
|
| 108 |
> |
if(WIN32) |
| 109 |
> |
install(PROGRAMS genBSDF.pl DESTINATION bin) |
| 110 |
> |
install(PROGRAMS genklemsamp.pl DESTINATION bin) |
| 111 |
> |
install(PROGRAMS genskyvec.pl DESTINATION bin) |
| 112 |
> |
install(PROGRAMS ltview.pl DESTINATION bin) |
| 113 |
> |
install(PROGRAMS ltpict.pl DESTINATION bin) |
| 114 |
> |
install(PROGRAMS objview.pl DESTINATION bin) |
| 115 |
> |
install(PROGRAMS objpict.pl DESTINATION bin) |
| 116 |
> |
else() |
| 117 |
> |
install(PROGRAMS genBSDF.pl DESTINATION bin RENAME genBSDF) |
| 118 |
> |
install(PROGRAMS genklemsamp.pl DESTINATION bin RENAME genklemsamp) |
| 119 |
> |
install(PROGRAMS genskyvec.pl DESTINATION bin RENAME genskyvec) |
| 120 |
> |
install(PROGRAMS genambpos.csh DESTINATION bin RENAME genambpos) |
| 121 |
> |
install(PROGRAMS ltview.pl DESTINATION bin) |
| 122 |
> |
install(PROGRAMS ltpict.pl DESTINATION bin) |
| 123 |
> |
install(PROGRAMS objview.pl DESTINATION bin RENAME objview) |
| 124 |
> |
install(PROGRAMS objpict.pl DESTINATION bin RENAME objpict) |
| 125 |
> |
install(PROGRAMS glare.csh DESTINATION bin RENAME glare) |
| 126 |
> |
install(PROGRAMS dayfact.csh DESTINATION bin RENAME dayfact) |
| 127 |
> |
install(PROGRAMS rlux.csh DESTINATION bin RENAME rlux) |
| 128 |
> |
install(PROGRAMS raddepend.csh DESTINATION bin RENAME raddepend) |
| 129 |
> |
install(PROGRAMS trad.wsh DESTINATION bin RENAME trad) |
| 130 |
> |
install(PROGRAMS objline.csh DESTINATION bin RENAME objline) |
| 131 |
> |
install(PROGRAMS compamb.csh DESTINATION bin RENAME compamb) |
| 132 |
> |
install(PROGRAMS vinfo.csh DESTINATION bin RENAME vinfo) |
| 133 |
> |
install(PROGRAMS fieldcomb.csh DESTINATION bin RENAME fieldcomb) |
| 134 |
> |
endif() |