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

Comparing ray/CMakeLists.txt (file contents):
Revision 1.2 by greg, Tue Oct 25 22:53:14 2011 UTC vs.
Revision 1.10 by greg, Tue Mar 25 21:22:30 2014 UTC

# Line 5 | Line 5 | enable_testing()
5   include(CTest)
6  
7   option(BUILD_SHARED_LIBS "Build radiance using shared libraries?" OFF)
8 + option(BUILD_HEADLESS "Build radiance without any GUI components?" OFF)
9  
10   if(NOT WIN32)
11 <  set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
11 >  set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 1)
12 >  install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc/man/ DESTINATION man)
13 >  set(qt_plugin_term "PLUGIN")
14   endif()
15 < set(CPACK_PACKAGING_INSTALL_PREFIX "/")
15 >
16 >
17 > if (WIN32)
18 >  set(CPACK_NSIS_MODIFY_PATH 1)
19 >  set(qt_plugin_term "LIBRARY")
20 >
21 >  # Set RAYPATH on install
22 >  set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
23 >    "WriteRegExpandStr HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\" RAYPATH '\\\"$INSTDIR\\\\lib\\\"'"
24 >  )
25 >
26 >  # Unset RAYPATH on uninstall
27 >  set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
28 >    "DeleteRegValue HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\" RAYPATH"
29 >  )
30 > endif()
31 >
32 > if(UNIX)
33 >  set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local/radiance")
34 >  add_definitions(-Dlinux -D_FILE_OFFSET_BITS=64 -DNOSTEREO)
35 > else()
36 >  set(CPACK_PACKAGING_INSTALL_PREFIX "/")
37 > endif()
38 >
39 > if(APPLE)
40 >  add_definitions(-DBSD -DNOSTEREO -Dfreebsd)
41 >  include_directories(/usr/X11R6/include)
42 >  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6")
43 > endif()
44 >
45 > IF( BUILD_PACKAGE )
46 >  INCLUDE(radianceCPack.cmake )
47 > ENDIF( BUILD_PACKAGE )
48 >
49   set(CPACK_PACKAGE_VERSION_MAJOR 4)
50 < set(CPACK_PACKAGE_VERSION_MINOR 1)
51 < set(CPACK_PACKAGE_VERSION_PATCH 0)
52 < set(CPACK_PACKAGE_INSTALL_DIRECTORY "Radiance ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
53 < SET(CPACK_RESOURCE_FILE_WELCOME "${radiance_SOURCE_DIR}/../Welcome.txt")
54 < SET(CPACK_RESOURCE_FILE_README "${radiance_SOURCE_DIR}/../README")
55 < SET(CPACK_RESOURCE_FILE_LICENSE "${radiance_SOURCE_DIR}/../License.txt")
50 > set(CPACK_PACKAGE_VERSION_MINOR 2)
51 > set(CPACK_PACKAGE_VERSION_PATCH a)
52 > set(CPACK_PACKAGE_INSTALL_DIRECTORY "Radiance")
53 > SET(CPACK_RESOURCE_FILE_WELCOME "${radiance_SOURCE_DIR}/Welcome.txt")
54 > SET(CPACK_RESOURCE_FILE_README "${radiance_SOURCE_DIR}/README.txt")
55 > SET(CPACK_RESOURCE_FILE_LICENSE "${radiance_SOURCE_DIR}/License.txt")
56 >
57 >
58   include(CPack)
59  
60 < find_package(Qt4 COMPONENTS QtCore QtGui)
60 > if(NOT BUILD_HEADLESS)
61 >  find_package(Qt4 COMPONENTS QtCore QtGui)
62 >  find_package(X11)
63 > endif()
64  
65   SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
66  
# Line 35 | Line 76 | endif()
76  
77   add_subdirectory("src")
78  
38 #download and extract radiance support files
39 include(ExternalProject)
40 set(base "${CMAKE_BINARY_DIR}/Downloads")
41 set_property(DIRECTORY PROPERTY EP_BASE ${base})
42 ExternalProject_Add(radiance_support
43  URL http://www.radiance-online.org/software/non-cvs/rad4R0supp.tar.gz
44  URL_MD5 123e3e40af59c8b246e1fdbf0661e877
45  CONFIGURE_COMMAND ""
46  BUILD_COMMAND ""
47  INSTALL_COMMAND ""
48 )
49
50 #install support files.
51 set(lib_dir ${base}/Source/radiance_support/lib)
79   set(test_dir ${CMAKE_CURRENT_SOURCE_DIR}/test/test\ data)
80 + option(BUILD_TESTING "Download support tarball & enable testing?" ON)
81 +
82 + if(BUILD_TESTING)
83 +  #download and extract radiance support files
84 +  include(ExternalProject)
85 +  set(base "${CMAKE_BINARY_DIR}/Downloads")
86 +  set_property(DIRECTORY PROPERTY EP_BASE ${base})
87 +  ExternalProject_Add(radiance_support
88 +    URL http://www.radiance-online.org/software/non-cvs/rad4R1supp.tar.gz
89 +    URL_MD5 efd82970e1d0747eede8eb64c01048f4
90 +    CONFIGURE_COMMAND ""
91 +    BUILD_COMMAND ""
92 +    INSTALL_COMMAND ""
93 +  )
94 +
95 +  #install support files.
96 +  set(lib_dir ${base}/Source/radiance_support/lib)
97 +  install(
98 +    FILES
99 +      ${lib_dir}/Earth.cal ${lib_dir}/He.cal ${lib_dir}/He3.cal
100 +      ${lib_dir}/adobe.cal ${lib_dir}/ball.cal ${lib_dir}/brick.cal
101 +      ${lib_dir}/brickweave.cal ${lib_dir}/carpet.cal ${lib_dir}/climit.cal
102 +      ${lib_dir}/corrug.cal ${lib_dir}/covelight.cal ${lib_dir}/cyl.cal
103 +      ${lib_dir}/dichroic.cal ${lib_dir}/dirt.cal ${lib_dir}/fisheye.cal
104 +      ${lib_dir}/fishgeom.cal ${lib_dir}/fprism.cal ${lib_dir}/globe.cal
105 +      ${lib_dir}/gloss.cal ${lib_dir}/grating.cal ${lib_dir}/jigglepic.cal
106 +      ${lib_dir}/lcp0.cal ${lib_dir}/limit.cal ${lib_dir}/marble.cal
107 +      ${lib_dir}/orange.cal ${lib_dir}/picture.cal ${lib_dir}/plink.cal
108 +      ${lib_dir}/prism.cal ${lib_dir}/retrorefl.cal ${lib_dir}/serraglaze.cal
109 +      ${lib_dir}/slate.cal ${lib_dir}/surf.cal ${lib_dir}/tim1.cal
110 +      ${lib_dir}/weave.cal ${lib_dir}/winxmit.cal ${lib_dir}/woodpat.cal
111 +      ${lib_dir}/woodtex.cal ${lib_dir}/wrinkle.cal
112 +      ${lib_dir}/page1.txt ${lib_dir}/page2.txt
113 +      ${lib_dir}/Pix.fnt
114 +      ${lib_dir}/PixOblique.fnt
115 +      ${lib_dir}/Veerdana.fnt
116 +      ${lib_dir}/VeerdanaBold.fnt
117 +      ${lib_dir}/VeerdanaBoldItalic.fnt
118 +      ${lib_dir}/VeerdanaItalic.fnt
119 +      ${lib_dir}/helvet.fnt
120 +      ${lib_dir}/hexbit4x1.fnt
121 +      ${test_dir}/model.oct
122 +      ${test_dir}/model.vp
123 +    DESTINATION lib
124 +  )
125 +
126 +  install(FILES ${lib_dir}/Earth.hdr DESTINATION lib RENAME Earth.pic)
127 +  install(FILES ${lib_dir}/EarthBig.hdr DESTINATION lib RENAME EarthBig.pic)
128 +  install(FILES ${lib_dir}/alberta.hdr DESTINATION lib RENAME alberta.pic)
129 +  install(FILES ${lib_dir}/brick.hdr DESTINATION lib RENAME brick.pic)
130 +  install(FILES ${lib_dir}/brickweave.hdr DESTINATION lib RENAME brickweave.pic)
131 +  install(FILES ${lib_dir}/cabin.hdr DESTINATION lib RENAME cabin.pic)
132 +  install(FILES ${lib_dir}/forestfl.hdr DESTINATION lib RENAME forestfl.pic)
133 +  install(FILES ${lib_dir}/oakfloor.hdr DESTINATION lib RENAME oakfloor.pic)
134 +  install(FILES ${lib_dir}/pine.hdr DESTINATION lib RENAME pine.pic)
135 +  install(FILES ${lib_dir}/pinebark.hdr DESTINATION lib RENAME pinebark.pic)
136 +  install(FILES ${lib_dir}/podlife.hdr DESTINATION lib RENAME podlife.pic)
137 +  install(FILES ${lib_dir}/richgrove.hdr DESTINATION lib RENAME richgrove.pic)
138 +  install(FILES ${lib_dir}/shingle.hdr DESTINATION lib RENAME shingle.pic)
139 +  install(FILES ${lib_dir}/summercab.hdr DESTINATION lib RENAME summercab.pic)
140 +  install(FILES ${lib_dir}/tulips.hdr DESTINATION lib RENAME tulips.pic)
141 +
142 +  add_subdirectory(cmake_tests)
143 + endif()
144 +  
145   install(
146    FILES
55    ${lib_dir}/Earth.cal ${lib_dir}/He.cal ${lib_dir}/He3.cal
56    ${lib_dir}/adobe.cal ${lib_dir}/ball.cal ${lib_dir}/brick.cal
57    ${lib_dir}/brickweave.cal ${lib_dir}/carpet.cal ${lib_dir}/climit.cal
58    ${lib_dir}/corrug.cal ${lib_dir}/covelight.cal ${lib_dir}/cyl.cal
59    ${lib_dir}/dichroic.cal ${lib_dir}/dirt.cal ${lib_dir}/fisheye.cal
60    ${lib_dir}/fishgeom.cal ${lib_dir}/fprism.cal ${lib_dir}/globe.cal
61    ${lib_dir}/gloss.cal ${lib_dir}/grating.cal ${lib_dir}/jigglepic.cal
62    ${lib_dir}/lcp0.cal ${lib_dir}/limit.cal ${lib_dir}/marble.cal
63    ${lib_dir}/orange.cal ${lib_dir}/picture.cal ${lib_dir}/plink.cal
64    ${lib_dir}/prism.cal ${lib_dir}/retrorefl.cal ${lib_dir}/serraglaze.cal
65    ${lib_dir}/slate.cal ${lib_dir}/surf.cal ${lib_dir}/tim1.cal
66    ${lib_dir}/weave.cal ${lib_dir}/winxmit.cal ${lib_dir}/woodpat.cal
67    ${lib_dir}/woodtex.cal ${lib_dir}/wrinkle.cal
68    ${lib_dir}/page1.txt ${lib_dir}/page2.txt
69    ${lib_dir}/Pix.fnt
70    ${lib_dir}/PixOblique.fnt
71    ${lib_dir}/Veerdana.fnt
72    ${lib_dir}/VeerdanaBold.fnt
73    ${lib_dir}/VeerdanaBoldItalic.fnt
74    ${lib_dir}/VeerdanaItalic.fnt
75    ${lib_dir}/helvet.fnt
76    ${lib_dir}/hexbit4x1.fnt
147      ${test_dir}/model.oct
148      ${test_dir}/model.vp
149 <  DESTINATION bin
149 >  DESTINATION lib
150   )
81
82 install(FILES ${lib_dir}/Earth.hdr DESTINATION bin RENAME Earth.pic)
83 install(FILES ${lib_dir}/EarthBig.hdr DESTINATION bin RENAME EarthBig.pic)
84 install(FILES ${lib_dir}/alberta.hdr DESTINATION bin RENAME alberta.pic)
85 install(FILES ${lib_dir}/brick.hdr DESTINATION bin RENAME brick.pic)
86 install(FILES ${lib_dir}/brickweave.hdr DESTINATION bin RENAME brickweave.pic)
87 install(FILES ${lib_dir}/cabin.hdr DESTINATION bin RENAME cabin.pic)
88 install(FILES ${lib_dir}/forestfl.hdr DESTINATION bin RENAME forestfl.pic)
89 install(FILES ${lib_dir}/oakfloor.hdr DESTINATION bin RENAME oakfloor.pic)
90 install(FILES ${lib_dir}/pine.hdr DESTINATION bin RENAME pine.pic)
91 install(FILES ${lib_dir}/pinebark.hdr DESTINATION bin RENAME pinebark.pic)
92 install(FILES ${lib_dir}/podlife.hdr DESTINATION bin RENAME podlife.pic)
93 install(FILES ${lib_dir}/richgrove.hdr DESTINATION bin RENAME richgrove.pic)
94 install(FILES ${lib_dir}/shingle.hdr DESTINATION bin RENAME shingle.pic)
95 install(FILES ${lib_dir}/summercab.hdr DESTINATION bin RENAME summercab.pic)
96 install(FILES ${lib_dir}/tulips.hdr DESTINATION bin RENAME tulips.pic)
97
98 add_subdirectory(cmake_tests)
151  
152   include(InstallRequiredSystemLibraries)
153   add_subdirectory(InstallRules)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines