ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
Revision: 1.1
Committed: Sat Oct 22 22:38:10 2011 UTC (12 years, 6 months ago) by greg
Content type: text/plain
Branch: MAIN
Log Message:
Added qt interface for rvu and cmake files from Bill Hoffman

File Contents

# User Rev Content
1 greg 1.1 set(VERSION_FILE "${radiance_BINARY_DIR}/src/rt/Version.c")
2     add_custom_command(
3     OUTPUT "${VERSION_FILE}"
4     COMMAND "${CMAKE_COMMAND}"
5     -DVERSION_OUT_FILE="${VERSION_FILE}"
6     -DVERSION_IN_FILE="${radiance_SOURCE_DIR}/src/util/VERSION"
7     -P "${radiance_SOURCE_DIR}/src/common/create_version.cmake"
8     )
9    
10     add_library(radiance
11     ambcomp.c ambient.c ambio.c aniso.c data.c dielectric.c fprism.c freeobjmem.c
12     func.c glass.c initotypes.c m_alias.c m_brdf.c m_bsdf.c m_clip.c m_direct.c
13     m_mirror.c m_mist.c mx_func.c mx_data.c noise3.c normal.c o_face.c o_cone.c
14     o_instance.c o_mesh.c p_data.c p_func.c preload.c raytrace.c renderopts.c
15     source.c sphere.c srcobstr.c srcsupp.c srcsamp.c t_data.c t_func.c text.c
16     "${VERSION_FILE}" virtuals.c)
17    
18     if(WIN32)
19     set(rayp_SOURCES raypwin.c)
20     else()
21     set(rayp_SOURCES raypcalls.c)
22     endif()
23    
24     add_library(raycalls raycalls.c ${rayp_SOURCES} rayfifo.c)
25    
26     add_executable(rtrace rtmain.c rtrace.c duphead.c persist.c)
27     target_link_libraries(rtrace raycalls radiance rtrad)
28    
29     add_executable(rpict rpmain.c rpict.c srcdraw.c duphead.c persist.c)
30     target_link_libraries(rpict radiance rtrad)
31     if(X11_FOUND)
32     set(X11_SOURCES x11.c x11twind.c)
33     add_definitions("-DHAS_X11")
34     endif()
35     if(QT4_FOUND)
36     add_definitions("-DHAS_QT")
37     endif()
38     add_executable(rvu
39     rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES}
40     colortab.c)
41     target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES})
42     # only link to rvu-qt-lib if qt is found
43     if(QT4_FOUND)
44     target_link_libraries(rvu qtrvu)
45     endif()
46    
47     add_executable(lookamb lookamb.c ambio.c)
48     target_link_libraries(lookamb rtrad)
49    
50     add_test(rtrace_Version ${EXECUTABLE_OUTPUT_PATH}/rtrace -version)
51     set_tests_properties(rtrace_Version PROPERTIES
52     PASS_REGULAR_EXPRESSION "RADIANCE")
53    
54     install(TARGETS radiance raycalls rtrace rpict rvu
55     RUNTIME DESTINATION bin
56     LIBRARY DESTINATION bin
57     ARCHIVE DESTINATION bin)
58     install(FILES rayinit.cal DESTINATION bin)