2 |
|
create_version_file("${VERSION_FILE}") |
3 |
|
|
4 |
|
add_library(radiance |
5 |
< |
ambcomp.c ambient.c ambio.c aniso.c ashikhmin.c data.c dielectric.c fprism.c freeobjmem.c |
6 |
< |
func.c glass.c initotypes.c m_alias.c m_brdf.c m_bsdf.c m_clip.c m_direct.c |
7 |
< |
m_mirror.c m_mist.c mx_func.c mx_data.c noise3.c normal.c o_face.c o_cone.c |
8 |
< |
o_instance.c o_mesh.c p_data.c p_func.c preload.c raytrace.c renderopts.c |
9 |
< |
source.c sphere.c srcobstr.c srcsupp.c srcsamp.c t_data.c t_func.c text.c |
10 |
< |
pmap.c pmapsrc.c pmapmat.c pmaprand.c pmapio.c |
11 |
< |
pmapbias.c pmapparm.c pmapcontrib.c pmapamb.c pmapray.c pmapopt.c |
12 |
< |
pmapdata.c pmapdiag.c pmaptype.c |
13 |
< |
"${VERSION_FILE}" virtuals.c) |
5 |
> |
ambcomp.c ambient.c ambio.c aniso.c ashikhmin.c data.c dielectric.c fprism.c freeobjmem.c |
6 |
> |
func.c glass.c initotypes.c m_alias.c m_brdf.c m_bsdf.c m_clip.c m_direct.c |
7 |
> |
m_mirror.c m_mist.c mx_func.c mx_data.c noise3.c normal.c o_face.c o_cone.c |
8 |
> |
o_instance.c o_mesh.c p_data.c p_func.c preload.c raytrace.c renderopts.c |
9 |
> |
source.c sphere.c srcobstr.c srcsupp.c srcsamp.c t_data.c t_func.c text.c |
10 |
> |
pmap.c pmapsrc.c pmapmat.c pmaprand.c pmapio.c |
11 |
> |
pmapbias.c pmapparm.c pmapcontrib.c pmapamb.c pmapray.c pmapopt.c |
12 |
> |
pmapdata.c pmapdiag.c pmaptype.c pmutil.c pmcontrib2.c |
13 |
> |
../common/random.h ../common/platform.h func.c |
14 |
> |
"${VERSION_FILE}" virtuals.c ../common/paths.c) |
15 |
|
|
16 |
|
if(WIN32) |
17 |
|
set(rayp_SOURCES raypwin.c) |
35 |
|
|
36 |
|
add_executable(mkpmap mkpmap.c) |
37 |
|
target_link_libraries(mkpmap radiance rtrad) |
37 |
– |
|
38 |
|
add_executable(pmapdump pmapdump.c pmaptype.c pmapparm.c) |
39 |
< |
target_link_libraries(pmapdump radiance rtrad) |
39 |
> |
target_link_libraries(pmapdump raycalls radiance rtrad) |
40 |
|
|
41 |
|
set(targets_to_install lookamb radiance raycalls rtrace rpict rcontrib mkpmap pmapdump) |
42 |
|
|
48 |
|
include_directories(${Qt5Widgets_INCLUDE_DIRS}) |
49 |
|
add_definitions("-DHAS_QT") |
50 |
|
endif() |
51 |
< |
if (X11_FOUND OR Qt5Widgets_DIR) |
52 |
< |
add_executable(rvu |
53 |
< |
rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES} |
54 |
< |
colortab.c) |
55 |
< |
target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES}) |
56 |
< |
list(APPEND targets_to_install rvu) |
51 |
> |
if(NOT BUILD_HEADLESS) |
52 |
> |
if (X11_FOUND OR Qt5Widgets_DIR) |
53 |
> |
add_executable(rvu |
54 |
> |
rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES} |
55 |
> |
colortab.c) |
56 |
> |
target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES}) |
57 |
> |
list(APPEND targets_to_install rvu) |
58 |
|
|
59 |
< |
# only link to rvu-qt-lib if qt is found |
60 |
< |
if(Qt5Widgets_DIR) |
61 |
< |
target_link_libraries(rvu qtrvu) |
59 |
> |
# only link to rvu-qt-lib if qt is found |
60 |
> |
if(Qt5Widgets_DIR) |
61 |
> |
target_link_libraries(rvu qtrvu) |
62 |
> |
endif() |
63 |
|
endif() |
64 |
|
endif() |
65 |
|
|
73 |
|
ARCHIVE DESTINATION bin) |
74 |
|
install(FILES rayinit.cal DESTINATION lib) |
75 |
|
|
76 |
< |
#install qt.conf & Qt plugins loaded by rvu at runtime |
77 |
< |
get_target_property(GIF_PLUGIN Qt5::QGifPlugin LOCATION) |
78 |
< |
get_target_property(ICO_PLUGIN Qt5::QICOPlugin LOCATION) |
79 |
< |
get_target_property(JPEG_PLUGIN Qt5::QJpegPlugin LOCATION) |
80 |
< |
get_target_property(MNG_PLUGIN Qt5::QMngPlugin LOCATION) |
81 |
< |
get_target_property(TIFF_PLUGIN Qt5::QTiffPlugin LOCATION) |
82 |
< |
install(PROGRAMS "${GIF_PLUGIN}" DESTINATION bin/plugins/imageformats) |
83 |
< |
install(PROGRAMS "${ICO_PLUGIN}" DESTINATION bin/plugins/imageformats) |
84 |
< |
install(PROGRAMS "${JPEG_PLUGIN}" DESTINATION bin/plugins/imageformats) |
85 |
< |
install(PROGRAMS "${MNG_PLUGIN}" DESTINATION bin/plugins/imageformats) |
86 |
< |
install(PROGRAMS "${TIFF_PLUGIN}" DESTINATION bin/plugins/imageformats) |
87 |
< |
install(FILES ${CMAKE_SOURCE_DIR}/InstallRules/qt.conf DESTINATION bin) |
76 |
> |
#install qt.conf & Qt plugins loaded by rvu at runtime. Ignore if we are building as headless |
77 |
> |
if(NOT BUILD_HEADLESS) |
78 |
> |
get_target_property(GIF_PLUGIN Qt5::QGifPlugin LOCATION) |
79 |
> |
get_target_property(ICO_PLUGIN Qt5::QICOPlugin LOCATION) |
80 |
> |
get_target_property(JPEG_PLUGIN Qt5::QJpegPlugin LOCATION) |
81 |
> |
#get_target_property(MNG_PLUGIN Qt5::QMngPlugin LOCATION) |
82 |
> |
get_target_property(TIFF_PLUGIN Qt5::QTiffPlugin LOCATION) |
83 |
> |
install(PROGRAMS "${GIF_PLUGIN}" DESTINATION bin/plugins/imageformats) |
84 |
> |
install(PROGRAMS "${ICO_PLUGIN}" DESTINATION bin/plugins/imageformats) |
85 |
> |
install(PROGRAMS "${JPEG_PLUGIN}" DESTINATION bin/plugins/imageformats) |
86 |
> |
#install(PROGRAMS "${MNG_PLUGIN}" DESTINATION bin/plugins/imageformats) |
87 |
> |
install(PROGRAMS "${TIFF_PLUGIN}" DESTINATION bin/plugins/imageformats) |
88 |
> |
install(FILES ${CMAKE_SOURCE_DIR}/InstallRules/qt.conf DESTINATION bin) |
89 |
|
|
90 |
< |
if(APPLE OR WIN32) |
91 |
< |
if(WIN32) |
92 |
< |
get_target_property(QPA_PLUGIN Qt5::QWindowsIntegrationPlugin LOCATION) |
93 |
< |
elseif(APPLE) |
94 |
< |
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION) |
95 |
< |
endif() |
90 |
> |
if(APPLE OR WIN32) |
91 |
> |
if(WIN32) |
92 |
> |
get_target_property(QPA_PLUGIN Qt5::QWindowsIntegrationPlugin LOCATION) |
93 |
> |
elseif(APPLE) |
94 |
> |
get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION) |
95 |
> |
endif() |
96 |
|
|
97 |
< |
install(PROGRAMS "${QPA_PLUGIN}" DESTINATION bin/plugins/platforms) |
97 |
> |
install(PROGRAMS "${QPA_PLUGIN}" DESTINATION bin/plugins/platforms) |
98 |
> |
endif() |
99 |
|
endif() |
96 |
– |
|