ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/CMakeLists.txt
(Generate patch)

Comparing ray/src/rt/CMakeLists.txt (file contents):
Revision 1.11 by greg, Fri May 8 18:07:38 2015 UTC vs.
Revision 1.14 by greg, Fri Sep 30 17:59:27 2016 UTC

# Line 1 | Line 1
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)
4 > if(WIN32)
5  
6 +  add_library(radiance
7 +    ambcomp.c ambient.c ambio.c aniso.c ashikhmin.c data.c dielectric.c fprism.c freeobjmem.c
8 +    func.c glass.c initotypes.c m_alias.c m_brdf.c m_bsdf.c m_clip.c m_direct.c
9 +    m_mirror.c m_mist.c mx_func.c mx_data.c noise3.c normal.c o_face.c o_cone.c
10 +    o_instance.c o_mesh.c p_data.c p_func.c preload.c raytrace.c renderopts.c
11 +    source.c sphere.c srcobstr.c srcsupp.c srcsamp.c t_data.c t_func.c text.c
12 +    pmapsrc.c pmapmat.c pmaprand.c pmapio.c
13 +    pmapbias.c pmapparm.c pmapamb.c pmapray.c pmapopt.c
14 +    pmapdata.c pmapdiag.c pmaptype.c pmutil.c pmcontrib2.c
15 +    "${VERSION_FILE}" virtuals.c)
16 +
17 + else()
18 +
19 +  add_library(radiance
20 +      ambcomp.c ambient.c ambio.c aniso.c ashikhmin.c data.c dielectric.c fprism.c freeobjmem.c
21 +      func.c glass.c initotypes.c m_alias.c m_brdf.c m_bsdf.c m_clip.c m_direct.c
22 +      m_mirror.c m_mist.c mx_func.c mx_data.c noise3.c normal.c o_face.c o_cone.c
23 +      o_instance.c o_mesh.c p_data.c p_func.c preload.c raytrace.c renderopts.c
24 +      source.c sphere.c srcobstr.c srcsupp.c srcsamp.c t_data.c t_func.c text.c
25 +      pmap.c pmapsrc.c pmapmat.c pmaprand.c pmapio.c
26 +      pmapbias.c pmapparm.c pmapcontrib.c pmapamb.c pmapray.c pmapopt.c
27 +      pmapdata.c pmapdiag.c pmaptype.c pmutil.c pmcontrib2.c
28 +      "${VERSION_FILE}" virtuals.c)
29 +
30 + endif()
31 +
32   if(WIN32)
33    set(rayp_SOURCES raypwin.c)
34   else()
# Line 32 | Line 49 | target_link_libraries(lookamb rtrad)
49   add_executable(rcontrib rcmain.c rcontrib.c rc2.c rc3.c)
50   target_link_libraries(rcontrib radiance rtrad)
51  
52 < add_executable(mkpmap mkpmap.c)
53 < target_link_libraries(mkpmap radiance rtrad)
52 > if(NOT WIN32)
53 >  add_executable(mkpmap mkpmap.c)
54 >  target_link_libraries(mkpmap radiance rtrad)
55 >  add_executable(pmapdump pmapdump.c pmaptype.c pmapparm.c)
56 >  target_link_libraries(pmapdump radiance rtrad)
57 > endif()
58  
59 < add_executable(pmapdump pmapdump.c pmaptype.c pmapparm.c)
60 < target_link_libraries(pmapdump radiance rtrad)
59 > set(targets_to_install lookamb radiance raycalls rtrace rpict rcontrib)
60 > if(NOT WIN32)
61 >  set(targets_to_install ${targets_to_install} mkpmap pmapdump)
62 > endif()
63  
41 set(targets_to_install lookamb radiance raycalls rtrace rpict rcontrib mkpmap pmapdump)
42
64   if(X11_FOUND)
65    set(X11_SOURCES x11.c x11twind.c)
66    add_definitions("-DHAS_X11")
# Line 48 | Line 69 | if(Qt5Widgets_DIR)
69    include_directories(${Qt5Widgets_INCLUDE_DIRS})
70    add_definitions("-DHAS_QT")
71   endif()
72 < if (X11_FOUND OR Qt5Widgets_DIR)
73 <  add_executable(rvu
74 <    rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES}
75 <    colortab.c)
76 <  target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES})
77 <  list(APPEND targets_to_install rvu)
72 > if(NOT BUILD_HEADLESS)
73 >  if (X11_FOUND OR Qt5Widgets_DIR)
74 >    add_executable(rvu
75 >      rvmain.c rview.c rv2.c rv3.c devtable.c devcomm.c editline.c ${X11_SOURCES}
76 >      colortab.c)
77 >    target_link_libraries(rvu raycalls radiance rtrad ${X11_LIBRARIES})
78 >    list(APPEND targets_to_install rvu)
79  
80 <  # only link to rvu-qt-lib if qt is found
81 <  if(Qt5Widgets_DIR)
82 <    target_link_libraries(rvu qtrvu)
80 >    # only link to rvu-qt-lib if qt is found
81 >    if(Qt5Widgets_DIR)
82 >      target_link_libraries(rvu qtrvu)
83 >    endif()
84    endif()
85   endif()
86  
# Line 71 | Line 94 | install(TARGETS ${targets_to_install}
94          ARCHIVE DESTINATION bin)
95   install(FILES rayinit.cal DESTINATION lib)
96  
97 < #install qt.conf & Qt plugins loaded by rvu at runtime
98 < get_target_property(GIF_PLUGIN Qt5::QGifPlugin LOCATION)
99 < get_target_property(ICO_PLUGIN Qt5::QICOPlugin LOCATION)
100 < get_target_property(JPEG_PLUGIN Qt5::QJpegPlugin LOCATION)
101 < get_target_property(MNG_PLUGIN Qt5::QMngPlugin LOCATION)
102 < get_target_property(TIFF_PLUGIN Qt5::QTiffPlugin LOCATION)
103 < install(PROGRAMS "${GIF_PLUGIN}" DESTINATION bin/plugins/imageformats)
104 < install(PROGRAMS "${ICO_PLUGIN}" DESTINATION bin/plugins/imageformats)
105 < install(PROGRAMS "${JPEG_PLUGIN}" DESTINATION bin/plugins/imageformats)
106 < install(PROGRAMS "${MNG_PLUGIN}" DESTINATION bin/plugins/imageformats)
107 < install(PROGRAMS "${TIFF_PLUGIN}" DESTINATION bin/plugins/imageformats)
108 < install(FILES ${CMAKE_SOURCE_DIR}/InstallRules/qt.conf DESTINATION bin)
97 > #install qt.conf & Qt plugins loaded by rvu at runtime. Ignore if we are building as headless
98 > if(NOT BUILD_HEADLESS)
99 >  get_target_property(GIF_PLUGIN Qt5::QGifPlugin LOCATION)
100 >  get_target_property(ICO_PLUGIN Qt5::QICOPlugin LOCATION)
101 >  get_target_property(JPEG_PLUGIN Qt5::QJpegPlugin LOCATION)
102 >  get_target_property(MNG_PLUGIN Qt5::QMngPlugin LOCATION)
103 >  get_target_property(TIFF_PLUGIN Qt5::QTiffPlugin LOCATION)
104 >  install(PROGRAMS "${GIF_PLUGIN}" DESTINATION bin/plugins/imageformats)
105 >  install(PROGRAMS "${ICO_PLUGIN}" DESTINATION bin/plugins/imageformats)
106 >  install(PROGRAMS "${JPEG_PLUGIN}" DESTINATION bin/plugins/imageformats)
107 >  install(PROGRAMS "${MNG_PLUGIN}" DESTINATION bin/plugins/imageformats)
108 >  install(PROGRAMS "${TIFF_PLUGIN}" DESTINATION bin/plugins/imageformats)
109 >  install(FILES ${CMAKE_SOURCE_DIR}/InstallRules/qt.conf DESTINATION bin)
110  
111 < if(APPLE OR WIN32)
112 <  if(WIN32)
113 <    get_target_property(QPA_PLUGIN Qt5::QWindowsIntegrationPlugin LOCATION)
114 <  elseif(APPLE)
115 <    get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
116 <  endif()
111 >  if(APPLE OR WIN32)
112 >    if(WIN32)
113 >      get_target_property(QPA_PLUGIN Qt5::QWindowsIntegrationPlugin LOCATION)
114 >    elseif(APPLE)
115 >      get_target_property(QPA_PLUGIN Qt5::QCocoaIntegrationPlugin LOCATION)
116 >    endif()
117  
118 <  install(PROGRAMS "${QPA_PLUGIN}" DESTINATION bin/plugins/platforms)
118 >    install(PROGRAMS "${QPA_PLUGIN}" DESTINATION bin/plugins/platforms)
119 >  endif()
120   endif()
96

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines