ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
Revision: 1.5
Committed: Wed May 30 18:31:11 2012 UTC (12 years, 5 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.4: +10 -0 lines
Log Message:
Patches to cmake build system and QT driver for rvu

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 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 "${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 if(X11_FOUND)
26 set(X11_SOURCES x11.c x11twind.c)
27 add_definitions("-DHAS_X11")
28 endif()
29 if(QT4_FOUND)
30 add_definitions("-DHAS_QT")
31 endif()
32 add_executable(rvu
33 rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES}
34 colortab.c)
35 target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES})
36 # only link to rvu-qt-lib if qt is found
37 if(QT4_FOUND)
38 target_link_libraries(rvu qtrvu)
39 endif()
40
41 add_executable(lookamb lookamb.c ambio.c)
42 target_link_libraries(lookamb rtrad)
43
44 add_test(rtrace_Version ${EXECUTABLE_OUTPUT_PATH}/rtrace -version)
45 set_tests_properties(rtrace_Version PROPERTIES
46 PASS_REGULAR_EXPRESSION "RADIANCE")
47
48 install(TARGETS lookamb radiance raycalls rtrace rpict rvu
49 RUNTIME DESTINATION bin
50 LIBRARY DESTINATION bin
51 ARCHIVE DESTINATION bin)
52 install(FILES rayinit.cal DESTINATION lib)
53
54 #install qt.conf & Qt plugins loaded by rvu at runtime
55 install(FILES ${QT_QGIF_PLUGIN_RELEASE} DESTINATION bin/plugins/imageformats)
56 install(FILES ${QT_QICO_PLUGIN_RELEASE} DESTINATION bin/plugins/imageformats)
57 install(FILES ${QT_QJPEG_PLUGIN_RELEASE} DESTINATION bin/plugins/imageformats)
58 install(FILES ${QT_QMNG_PLUGIN_RELEASE} DESTINATION bin/plugins/imageformats)
59 install(FILES ${QT_QSVG_PLUGIN_RELEASE} DESTINATION bin/plugins/imageformats)
60 install(FILES ${QT_QTIFF_PLUGIN_RELEASE} DESTINATION bin/plugins/imageformats)
61 install(FILES ${CMAKE_SOURCE_DIR}/InstallRules/qt.conf DESTINATION bin)
62