ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
Revision: 1.9
Committed: Thu Mar 20 22:49:21 2014 UTC (10 years, 1 month ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad4R2P2, rad4R2, rad4R2P1
Changes since 1.8: +21 -14 lines
Log Message:
Changes to speed installation on cloud computing systems

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