1 |
greg |
1.1 |
set(VERSION_FILE "${radiance_BINARY_DIR}/src/util/Version.c") |
2 |
|
|
add_custom_command( |
3 |
|
|
OUTPUT "${VERSION_FILE}" |
4 |
greg |
1.2 |
DEPENDS "${radiance_SOURCE_DIR}/src/rt/VERSION" |
5 |
greg |
1.1 |
COMMAND "${CMAKE_COMMAND}" |
6 |
|
|
-DVERSION_OUT_FILE="${VERSION_FILE}" |
7 |
greg |
1.2 |
-DVERSION_IN_FILE="${radiance_SOURCE_DIR}/src/rt/VERSION" |
8 |
|
|
-P "${radiance_SOURCE_DIR}/src/rt/create_version.cmake" |
9 |
greg |
1.1 |
) |
10 |
|
|
|
11 |
|
|
add_executable(dctimestep dctimestep.c) |
12 |
|
|
target_link_libraries(dctimestep rtrad) |
13 |
|
|
|
14 |
|
|
add_executable(findglare findglare.c glareval.c glaresrc.c setscan.c) |
15 |
|
|
target_link_libraries(findglare rtrad) |
16 |
|
|
|
17 |
|
|
add_executable(getinfo getinfo.c) |
18 |
|
|
target_link_libraries(getinfo rtrad) |
19 |
|
|
|
20 |
|
|
add_executable(glarendx glarendx.c) |
21 |
|
|
target_link_libraries(glarendx rtrad) |
22 |
|
|
|
23 |
|
|
add_executable(rad rad.c) |
24 |
|
|
target_link_libraries(rad rtrad) |
25 |
|
|
if(WIN32) |
26 |
|
|
set(netproc_SOURCES win_netproc.c) |
27 |
|
|
else() |
28 |
|
|
set(netproc_SOURCES netproc.c) |
29 |
|
|
endif() |
30 |
|
|
add_executable(ranimate ranimate.c ${netproc_SOURCES}) |
31 |
|
|
target_link_libraries(ranimate rtrad) |
32 |
|
|
|
33 |
|
|
add_executable(rpiece rpiece.c "${VERSION_FILE}") |
34 |
|
|
target_link_libraries(rpiece rtrad) |
35 |
|
|
|
36 |
|
|
add_executable(rtcontrib |
37 |
|
|
rtcontrib.c "${VERSION_FILE}") |
38 |
|
|
target_link_libraries(rtcontrib rtrad) |
39 |
|
|
|
40 |
|
|
add_executable(vwrays vwrays.c) |
41 |
|
|
target_link_libraries(vwrays rtrad) |
42 |
|
|
|
43 |
|
|
add_executable(vwright vwright.c) |
44 |
|
|
target_link_libraries(vwright rtrad) |
45 |
|
|
|
46 |
|
|
#the next few libraries all need to include header files from the rt directory |
47 |
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../rt) |
48 |
|
|
|
49 |
|
|
add_executable(ranimove ranimove.c ranimove1.c ranimove2.c) |
50 |
|
|
target_link_libraries(ranimove raycalls radiance rtrad) |
51 |
|
|
|
52 |
|
|
add_executable(rsensor rsensor.c) |
53 |
|
|
target_link_libraries(rsensor raycalls radiance rtrad) |
54 |
|
|
|
55 |
|
|
if(X11_FOUND) |
56 |
|
|
add_executable(xglaresrc |
57 |
|
|
xglaresrc.c ${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c) |
58 |
|
|
target_link_libraries(xglaresrc rtrad ${X11_LIBRARIES}) |
59 |
|
|
install(TARGETS xglaresrc RUNTIME DESTINATION bin) |
60 |
|
|
endif() |
61 |
|
|
|
62 |
|
|
find_library(LIB_RGL "rgl" DOC "Path to librgl") |
63 |
|
|
if(LIB_RGL) |
64 |
|
|
#glrad needs to be able to include OpenGL headers |
65 |
|
|
include_directories(${OPENGL_INCLUDE_DIR}) |
66 |
|
|
|
67 |
|
|
#check if we have SGIStereo.h |
68 |
|
|
find_file(HAVE_SGISTEREO_H "SGIStereo.h" ${OPENGL_INCLUDE_DIR}) |
69 |
|
|
if(NOT HAVE_SGISTEREO_H) |
70 |
|
|
add_definitions(-DNOSTEREO) |
71 |
|
|
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) |
77 |
|
|
endif() |
78 |
|
|
|
79 |
|
|
install(TARGETS dctimestep findglare getinfo glarendx rad ranimate rpiece |
80 |
|
|
rtcontrib vwrays vwright ranimove rsensor |
81 |
|
|
RUNTIME DESTINATION bin) |
82 |
|
|
install(FILES objview.csh objpict.csh glare.csh dayfact.csh rlux.csh |
83 |
|
|
raddepend.csh trad.wsh objline.csh compamb.csh vinfo.csh |
84 |
|
|
genambpos.csh fieldcomb.csh genklemsamp.pl genskyvec.pl |
85 |
|
|
genBSDF.pl tregsamp.dat |
86 |
|
|
DESTINATION bin) |