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, 3 weeks 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

# User Rev Content
1 greg 1.1 set(VERSION_FILE "${radiance_BINARY_DIR}/src/rt/Version.c")
2 greg 1.3 create_version_file("${VERSION_FILE}")
3 greg 1.1
4 greg 1.15 add_library(radiance
5 greg 1.17 "${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 greg 1.1
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 greg 1.17 add_executable(rtrace rtmain.c rtrace.c duphead.c persist.c)
76 greg 1.1 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 greg 1.9
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 greg 1.15 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 greg 1.10
92 greg 1.17 set(targets_to_install
93     lookamb
94     mkpmap
95     pmapdump
96     radiance
97     raycalls
98     rcontrib
99     rpict
100     rtrace
101     )
102 greg 1.9
103 greg 1.1 if(X11_FOUND)
104     set(X11_SOURCES x11.c x11twind.c)
105 greg 1.17 add_definitions(-DHAS_X11)
106 greg 1.1 endif()
107 greg 1.18 if(Qt5Widgets_FOUND AND BUILD_QT)
108 greg 1.11 include_directories(${Qt5Widgets_INCLUDE_DIRS})
109 greg 1.17 add_definitions(-DHAS_QT)
110 greg 1.1 endif()
111 greg 1.13 if(NOT BUILD_HEADLESS)
112 greg 1.18 if(X11_FOUND OR BUILD_QT)
113 greg 1.13 add_executable(rvu
114 greg 1.17 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 greg 1.13 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 greg 1.18 if(BUILD_QT)
129 greg 1.13 target_link_libraries(rvu qtrvu)
130     endif()
131 greg 1.9 endif()
132 greg 1.1 endif()
133    
134 greg 1.17 #add_test(rtrace_version "${EXECUTABLE_OUTPUT_PATH}/rtrace" -version)
135     #set_tests_properties(rtrace_version PROPERTIES
136     # PASS_REGULAR_EXPRESSION "RADIANCE"
137     #)
138 greg 1.1
139 greg 1.9 install(TARGETS ${targets_to_install}
140 greg 1.17 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 greg 1.5
148 greg 1.12 #install qt.conf & Qt plugins loaded by rvu at runtime. Ignore if we are building as headless
149 greg 1.18 if(NOT BUILD_HEADLESS AND BUILD_QT)
150 greg 1.12 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 greg 1.17 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 greg 1.12
169 greg 1.17 install(PROGRAMS "${QPA_PLUGIN}"
170     DESTINATION "bin/plugins/platforms"
171     )
172 greg 1.11 endif()