| 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 |  |  | add_executable(dctimestep dctimestep.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 |  |  | if(WIN32) | 
| 19 |  |  | set(netproc_SOURCES win_netproc.c) | 
| 20 |  |  | else() | 
| 21 |  |  | set(netproc_SOURCES netproc.c) | 
| 22 |  |  | endif() | 
| 23 |  |  | add_executable(ranimate ranimate.c ${netproc_SOURCES}) | 
| 24 |  |  | target_link_libraries(ranimate rtrad) | 
| 25 |  |  |  | 
| 26 |  |  | add_executable(rpiece rpiece.c "${VERSION_FILE}") | 
| 27 |  |  | target_link_libraries(rpiece rtrad) | 
| 28 |  |  |  | 
| 29 |  |  | add_executable(rtcontrib | 
| 30 |  |  | rtcontrib.c "${VERSION_FILE}") | 
| 31 |  |  | target_link_libraries(rtcontrib rtrad) | 
| 32 |  |  |  | 
| 33 |  |  | add_executable(vwrays vwrays.c) | 
| 34 |  |  | target_link_libraries(vwrays rtrad) | 
| 35 |  |  |  | 
| 36 |  |  | add_executable(vwright vwright.c) | 
| 37 |  |  | target_link_libraries(vwright rtrad) | 
| 38 |  |  |  | 
| 39 |  |  | #the next few libraries all need to include header files from the rt directory | 
| 40 |  |  | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../rt) | 
| 41 |  |  |  | 
| 42 |  |  | add_executable(ranimove ranimove.c ranimove1.c ranimove2.c) | 
| 43 |  |  | target_link_libraries(ranimove raycalls radiance rtrad) | 
| 44 |  |  |  | 
| 45 |  |  | add_executable(rsensor rsensor.c) | 
| 46 |  |  | target_link_libraries(rsensor raycalls radiance rtrad) | 
| 47 |  |  |  | 
| 48 |  |  | if(X11_FOUND) | 
| 49 |  |  | add_executable(xglaresrc | 
| 50 |  |  | xglaresrc.c ${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c) | 
| 51 |  |  | target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES}) | 
| 52 |  |  | install(TARGETS xglaresrc RUNTIME DESTINATION bin) | 
| 53 |  |  | endif() | 
| 54 |  |  |  | 
| 55 | greg | 1.4 | #glrad needs to link against OpenGL libraries | 
| 56 |  |  | if(APPLE) | 
| 57 |  |  | find_library(OPENGL_gl_LIBRARY | 
| 58 |  |  | NAMES GL MesaGL | 
| 59 |  |  | PATHS /usr/X11R6/lib | 
| 60 |  |  | ) | 
| 61 |  |  | find_library(OPENGL_glu_LIBRARY | 
| 62 |  |  | NAMES GLU MesaGLU | 
| 63 |  |  | PATHS /usr/X11R6/lib | 
| 64 |  |  | ) | 
| 65 |  |  | set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) | 
| 66 |  |  | else() | 
| 67 |  |  | find_package(OpenGL REQUIRED) | 
| 68 | greg | 1.1 | include_directories(${OPENGL_INCLUDE_DIR}) | 
| 69 | greg | 1.4 | endif() | 
| 70 | greg | 1.1 |  | 
| 71 | greg | 1.4 | #check if       we have SGIStereo.h | 
| 72 |  |  | find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) | 
| 73 |  |  | if(NOT HAVE_SGISTEREO_H) | 
| 74 |  |  | add_definitions(-DNOSTEREO) | 
| 75 |  |  | endif() | 
| 76 |  |  | if(UNIX) | 
| 77 |  |  | add_executable(glrad glrad.c) | 
| 78 |  |  | target_link_libraries(glrad rgl rtrad ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) | 
| 79 | greg | 1.5 | install(TARGETS rpiece RUNTIME DESTINATION bin) | 
| 80 |  |  | if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") | 
| 81 |  |  | target_link_libraries(glrad rt) | 
| 82 |  |  | endif() | 
| 83 | greg | 1.1 | endif() | 
| 84 | greg | 1.5 | install(TARGETS dctimestep findglare getinfo glarendx rad ranimate | 
| 85 | greg | 1.1 | rtcontrib vwrays vwright ranimove rsensor | 
| 86 |  |  | RUNTIME DESTINATION bin) | 
| 87 | greg | 1.4 |  | 
| 88 |  |  | if(WIN32) | 
| 89 |  |  | install(PROGRAMS genBSDF.pl DESTINATION bin) | 
| 90 |  |  | install(PROGRAMS genklemsamp.pl DESTINATION bin) | 
| 91 |  |  | install(PROGRAMS genskyvec.pl DESTINATION bin) | 
| 92 |  |  | install(FILES tregsamp.dat DESTINATION bin) | 
| 93 |  |  | else() | 
| 94 |  |  | install(PROGRAMS genBSDF.pl DESTINATION bin RENAME genBSDF) | 
| 95 |  |  | install(PROGRAMS genklemsamp.pl DESTINATION bin RENAME genklemsamp) | 
| 96 |  |  | install(PROGRAMS genskyvec.pl DESTINATION bin RENAME genskyvec) | 
| 97 |  |  | install(PROGRAMS objview.csh DESTINATION bin RENAME objview) | 
| 98 |  |  | install(PROGRAMS objpict.csh DESTINATION bin RENAME objpict) | 
| 99 |  |  | install(PROGRAMS glare.csh DESTINATION bin RENAME glare) | 
| 100 |  |  | install(PROGRAMS dayfact.csh DESTINATION bin RENAME dayfact) | 
| 101 |  |  | install(PROGRAMS rlux.csh DESTINATION bin RENAME rlux) | 
| 102 |  |  | install(PROGRAMS raddepend.csh DESTINATION bin RENAME raddepend) | 
| 103 |  |  | install(PROGRAMS trad.wsh DESTINATION bin RENAME trad) | 
| 104 |  |  | install(PROGRAMS objline.csh DESTINATION bin RENAME objline) | 
| 105 |  |  | install(PROGRAMS compamb.csh DESTINATION bin RENAME compamb) | 
| 106 |  |  | install(PROGRAMS vinfo.csh DESTINATION bin RENAME vinfo) | 
| 107 |  |  | install(PROGRAMS genambpos.csh DESTINATION bin RENAME genambpos) | 
| 108 |  |  | install(PROGRAMS fieldcomb.csh DESTINATION bin RENAME fieldcomb) | 
| 109 |  |  | install(FILES tregsamp.dat DESTINATION lib) | 
| 110 |  |  | endif() |