1 |
set(VERSION_FILE "${radiance_BINARY_DIR}/src/util/Version.c") |
2 |
create_version_file("${VERSION_FILE}") |
3 |
|
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 |
find_library(LIB_RGL "rgl" DOC "Path to librgl") |
56 |
if(LIB_RGL) |
57 |
#glrad needs to be able to include OpenGL headers |
58 |
include_directories(${OPENGL_INCLUDE_DIR}) |
59 |
|
60 |
#check if we have SGIStereo.h |
61 |
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
62 |
if(NOT HAVE_SGISTEREO_H) |
63 |
add_definitions(-DNOSTEREO) |
64 |
endif() |
65 |
|
66 |
add_executable(glrad glrad.c) |
67 |
target_link_libraries(glrad |
68 |
rtrad ${LIB_RGL} ${OPENGL_LIBRARIES} ${X11_LIBRARIES}) |
69 |
install(TARGETS glrad RUNTIME DESTINATION bin) |
70 |
endif() |
71 |
|
72 |
install(TARGETS dctimestep findglare getinfo glarendx rad ranimate rpiece |
73 |
rtcontrib vwrays vwright ranimove rsensor |
74 |
RUNTIME DESTINATION bin) |
75 |
install(FILES objview.csh objpict.csh glare.csh dayfact.csh rlux.csh |
76 |
raddepend.csh trad.wsh objline.csh compamb.csh vinfo.csh |
77 |
genambpos.csh fieldcomb.csh genklemsamp.pl genskyvec.pl |
78 |
genBSDF.pl tregsamp.dat |
79 |
DESTINATION bin) |