ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
Revision: 1.19
Committed: Fri Aug 2 18:47:25 2024 UTC (9 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.18: +0 -1 lines
Log Message:
feat(gensdaymtx,epw2wea,genssky): Taoning added new gensdaymtx and updated others

File Contents

# Content
1 set(VERSION_FILE "${radiance_BINARY_DIR}/src/rt/Version.c")
2 create_version_file("${VERSION_FILE}")
3
4 add_library(radiance
5 "${VERSION_FILE}"
6 ../common/paths.c
7 ../common/platform.h
8 ../common/random.h
9 ambcomp.c
10 ambient.c
11 ambio.c
12 aniso.c
13 ashikhmin.c
14 dielectric.c
15 fprism.c
16 freeobjmem.c
17 func.c
18 glass.c
19 initotypes.c
20 m_alias.c
21 m_brdf.c
22 m_bsdf.c
23 m_clip.c
24 m_direct.c
25 m_mirror.c
26 m_mist.c
27 mx_data.c
28 mx_func.c
29 noise3.c
30 normal.c
31 o_cone.c
32 o_face.c
33 o_instance.c
34 o_mesh.c
35 p_data.c
36 p_func.c
37 pmap.c
38 pmapamb.c
39 pmapbias.c
40 pmapcontrib.c
41 pmapdata.c
42 pmapdiag.c
43 pmapio.c
44 pmapmat.c
45 pmapopt.c
46 pmapparm.c
47 pmaprand.c
48 pmapray.c
49 pmapsrc.c
50 pmaptype.c
51 pmcontrib2.c
52 pmutil.c
53 preload.c
54 raytrace.c
55 renderopts.c
56 source.c
57 sphere.c
58 srcobstr.c
59 srcsamp.c
60 srcsupp.c
61 t_data.c
62 t_func.c
63 text.c
64 virtuals.c
65 )
66
67 if(WIN32)
68 set(rayp_SOURCES raypwin.c)
69 else()
70 set(rayp_SOURCES raypcalls.c)
71 endif()
72
73 add_library(raycalls raycalls.c ${rayp_SOURCES} rayfifo.c)
74
75 add_executable(rtrace rtmain.c rtrace.c duphead.c persist.c)
76 target_link_libraries(rtrace raycalls radiance rtrad)
77
78 add_executable(rpict rpmain.c rpict.c srcdraw.c duphead.c persist.c)
79 target_link_libraries(rpict radiance rtrad)
80
81 add_executable(lookamb lookamb.c ambio.c)
82 target_link_libraries(lookamb rtrad)
83
84 add_executable(rcontrib rcmain.c rcontrib.c rc2.c rc3.c)
85 target_link_libraries(rcontrib radiance rtrad)
86
87 add_executable(mkpmap mkpmap.c)
88 target_link_libraries(mkpmap radiance rtrad)
89 add_executable(pmapdump pmapdump.c pmaptype.c pmapparm.c)
90 target_link_libraries(pmapdump raycalls radiance rtrad)
91
92 set(targets_to_install
93 lookamb
94 mkpmap
95 pmapdump
96 radiance
97 raycalls
98 rcontrib
99 rpict
100 rtrace
101 )
102
103 if(X11_FOUND)
104 set(X11_SOURCES x11.c x11twind.c)
105 add_definitions(-DHAS_X11)
106 endif()
107 if(Qt5Widgets_FOUND AND BUILD_QT)
108 include_directories(${Qt5Widgets_INCLUDE_DIRS})
109 add_definitions(-DHAS_QT)
110 endif()
111 if(NOT BUILD_HEADLESS)
112 if(X11_FOUND OR BUILD_QT)
113 add_executable(rvu
114 colortab.c
115 devcomm.c
116 devtable.c
117 editline.c
118 rv2.c
119 rv3.c
120 rview.c
121 rvmain.c
122 ${X11_SOURCES}
123 )
124 target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES})
125 list(APPEND targets_to_install rvu)
126
127 # only link to rvu-qt-lib if qt is found
128 if(BUILD_QT)
129 target_link_libraries(rvu qtrvu)
130 endif()
131 endif()
132 endif()
133
134 #add_test(rtrace_version "${EXECUTABLE_OUTPUT_PATH}/rtrace" -version)
135 #set_tests_properties(rtrace_version PROPERTIES
136 # PASS_REGULAR_EXPRESSION "RADIANCE"
137 #)
138
139 install(TARGETS ${targets_to_install}
140 RUNTIME DESTINATION "bin"
141 LIBRARY DESTINATION "bin"
142 ARCHIVE DESTINATION "bin"
143 )
144 file(COPY rayinit.cal
145 DESTINATION "${CMAKE_BINARY_DIR}/lib"
146 )
147
148 #install qt.conf & Qt plugins loaded by rvu at runtime. Ignore if we are building as headless
149 if(NOT BUILD_HEADLESS AND BUILD_QT)
150 get_target_property(GIF_PLUGIN Qt5::QGifPlugin LOCATION)
151 get_target_property(ICO_PLUGIN Qt5::QICOPlugin LOCATION)
152 get_target_property(JPEG_PLUGIN Qt5::QJpegPlugin LOCATION)
153 get_target_property(TIFF_PLUGIN Qt5::QTiffPlugin LOCATION)
154 install(PROGRAMS "${GIF_PLUGIN}" "${ICO_PLUGIN}" "${JPEG_PLUGIN}" "${TIFF_PLUGIN}"
155 DESTINATION "bin/plugins/imageformats"
156 )
157 install(FILES "${CMAKE_SOURCE_DIR}/InstallRules/qt.conf"
158 DESTINATION "bin"
159 )
160
161 if(WIN32)
162 get_target_property(QPA_PLUGIN Qt5::QWindowsIntegrationPlugin LOCATION)
163 elseif(APPLE)
164 get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
165 elseif(UNIX)
166 get_target_property(QPA_PLUGIN Qt5::QXcbIntegrationPlugin LOCATION)
167 endif()
168
169 install(PROGRAMS "${QPA_PLUGIN}"
170 DESTINATION "bin/plugins/platforms"
171 )
172 endif()