ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
Revision: 1.10
Committed: Thu Apr 2 16:42:50 2015 UTC (9 years, 1 month ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.9: +10 -1 lines
Log Message:
Changes to support new pmap compilation

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 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)
14
15 if(WIN32)
16 set(rayp_SOURCES raypwin.c)
17 else()
18 set(rayp_SOURCES raypcalls.c)
19 endif()
20
21 add_library(raycalls raycalls.c ${rayp_SOURCES} rayfifo.c)
22
23 add_executable(rtrace rtmain.c rtrace.c duphead.c persist.c)
24 target_link_libraries(rtrace raycalls radiance rtrad)
25
26 add_executable(rpict rpmain.c rpict.c srcdraw.c duphead.c persist.c)
27 target_link_libraries(rpict radiance rtrad)
28
29 add_executable(lookamb lookamb.c ambio.c)
30 target_link_libraries(lookamb rtrad)
31
32 add_executable(rcontrib rcmain.c rcontrib.c rc2.c rc3.c)
33 target_link_libraries(rcontrib radiance rtrad)
34
35 add_executable(mkpmap mkpmap.c)
36 target_link_libraries(mkpmap radiance rtrad)
37
38 add_executable(pmapdump pmapdump.c pmaptype.c pmapparm.c)
39 target_link_libraries(pmapdump radiance rtrad)
40
41 set(targets_to_install lookamb radiance raycalls rtrace rpict rcontrib mkpmap pmapdump)
42
43 if(X11_FOUND)
44 set(X11_SOURCES x11.c x11twind.c)
45 add_definitions("-DHAS_X11")
46 endif()
47 if(QT4_FOUND)
48 add_definitions("-DHAS_QT")
49 endif()
50 if (X11_FOUND OR QT4_FOUND)
51 add_executable(rvu
52 rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES}
53 colortab.c)
54 target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES})
55 list(APPEND targets_to_install rvu)
56
57 # only link to rvu-qt-lib if qt is found
58 if(QT4_FOUND)
59 target_link_libraries(rvu qtrvu)
60 endif()
61 endif()
62
63 add_test(rtrace_Version ${EXECUTABLE_OUTPUT_PATH}/rtrace -version)
64 set_tests_properties(rtrace_Version PROPERTIES
65 PASS_REGULAR_EXPRESSION "RADIANCE")
66
67 install(TARGETS ${targets_to_install}
68 RUNTIME DESTINATION bin
69 LIBRARY DESTINATION bin
70 ARCHIVE DESTINATION bin)
71 install(FILES rayinit.cal DESTINATION lib)
72
73 #install qt.conf & Qt plugins loaded by rvu at runtime
74 install(FILES ${QT_QGIF_${qt_plugin_term}_RELEASE} DESTINATION bin/plugins/imageformats)
75 install(FILES ${QT_QICO_${qt_plugin_term}_RELEASE} DESTINATION bin/plugins/imageformats)
76 install(FILES ${QT_QJPEG_${qt_plugin_term}_RELEASE} DESTINATION bin/plugins/imageformats)
77 install(FILES ${QT_QMNG_${qt_plugin_term}_RELEASE} DESTINATION bin/plugins/imageformats)
78 install(FILES ${QT_QSVG_${qt_plugin_term}_RELEASE} DESTINATION bin/plugins/imageformats)
79 install(FILES ${QT_QTIFF_${qt_plugin_term}_RELEASE} DESTINATION bin/plugins/imageformats)
80 install(FILES ${CMAKE_SOURCE_DIR}/InstallRules/qt.conf DESTINATION bin)
81