ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
Revision: 1.22
Committed: Thu Jul 24 01:24:01 2025 UTC (9 days, 2 hours ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +2 -0 lines
Log Message:
chore: Added version string to all CMakeLists.txt files

File Contents

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