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

Comparing src/px/CMakeLists.txt (file contents):
Revision 1.3 by greg, Wed May 30 18:31:11 2012 UTC vs.
Revision 1.10 by greg, Thu Jul 24 01:24:01 2025 UTC

# Line 1 | Line 1
1 < add_executable(pfilt pfilt.c pf2.c pf3.c)
1 > # RCSid $Id$
2 >
3 > add_executable(pfilt pf2.c pf3.c pfilt.c)
4   target_link_libraries(pfilt rtrad)
5  
6   add_executable(pcond pcond.c pcond2.c pcond3.c pcond4.c warp3d.c)
# Line 45 | Line 47 | target_link_libraries(ra_pict rtrad)
47  
48   add_executable(ra_hexbit ra_hexbit.c)
49   target_link_libraries(ra_hexbit rtrad)
50 +
51   if(X11_FOUND)
52    add_executable(ximage x11image.c x11raster.c clrtab.c)
53    target_link_libraries(ximage rtrad ${X11_LIBRARIES})
54 <  add_executable(xshowtrace xshowtrace.c
55 <    ${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c)
54 >  add_executable(xshowtrace
55 >    xshowtrace.c
56 >    "${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c"
57 >  )
58    target_link_libraries(xshowtrace rtrad ${X11_LIBRARIES})
59 <  install(TARGETS ximage xshowtrace RUNTIME DESTINATION bin)
59 >  install(TARGETS ximage xshowtrace
60 >    RUNTIME DESTINATION "bin"
61 >  )
62   endif()
63 +
64   add_executable(pflip pflip.c)
65   target_link_libraries(pflip rtrad)
66  
# Line 74 | Line 82 | target_link_libraries(ra_xyze rtrad)
82   add_executable(macbethcal macbethcal.c pmapgen.c mx3.c warp3d.c)
83   target_link_libraries(macbethcal rtrad)
84  
85 + add_executable(pmblur2 pmblur2.c)
86 + target_link_libraries(pmblur2 rtrad)
87 +
88 + add_executable(psketch psketch.c)
89 + target_link_libraries(psketch rtrad)
90 +
91   if(NOT TIFF_LIBRARY)
92    find_package(TIFF)
93   endif()
94   mark_as_advanced(CLEAR TIFF_INCLUDE_DIR TIFF_LIBRARY)
95  
96 < #special case for manually built libtiff where find_package fails
96 > #special case for manually-built libtiff where find_package fails
97   if(NOT TIFF_FOUND)
98 <  find_library(TIFF_LIBRARY NAMES libtiff.a tiff tiff3 libtiff
98 >  find_library(TIFF_LIBRARY
99 >    NAMES libtiff.a tiff tiff3 libtiff
100      PATHS
101 <      ${CMAKE_CURRENT_SOURCE_DIR}/tiff/libtiff/.libs
102 <      ${radiance_BINARY_DIR}/Downloads/Source/radiance_support/src/px/tiff/libtiff/.libs
101 >      "${CMAKE_CURRENT_SOURCE_DIR}/tiff/libtiff/.libs"
102 >      "${radiance_BINARY_DIR}/Downloads/Source/radiance_support/src/px/tiff/libtiff/.libs"
103        "C:/Program Files/GnuWin32/lib"
104        "C:/Program Files (x86)/GnuWin32/lib"
105    )
# Line 100 | Line 115 | if(NOT TIFF_FOUND)
115        set(TIFF_INCLUDE_DIR "${TIFF_INCLUDE_DIR}" CACHE PATH "Directory containing tiff.h" FORCE)
116      endif()
117    endif()
118 <  #if tiff.h couldn't be found, default to the version in the support tarball
104 <  if(NOT TIFF_INCLUDE_DIR)
105 <    set(TIFF_INCLUDE_DIR "${radiance_BINARY_DIR}/Downloads/Source/radiance_support/src/px/tiff/libtiff" CACHE PATH "Directory containing tiff.h" FORCE)
106 <  endif()
107 <    
118 >
119    find_library(Z_LIBRARY z)
120    if(TIFF_LIBRARY AND Z_LIBRARY)
121      set(TIFF_FOUND TRUE)
122 <    get_filename_component(Z_LIBRARY_RESOLVED ${Z_LIBRARY} REALPATH)
122 >    get_filename_component(Z_LIBRARY_RESOLVED ${Z_LIBRARY} REALPATH)
123      set(TIFF_LIBRARIES ${TIFF_LIBRARY} ${Z_LIBRARY_RESOLVED})
124    else()
125      #try find_package again
# Line 123 | Line 134 | if(TIFF_FOUND)
134    target_link_libraries(ra_tiff rtrad ${TIFF_LIBRARIES})
135    add_executable(normtiff normtiff.c)
136    target_link_libraries(normtiff rtrad ${TIFF_LIBRARIES})
137 <  install(TARGETS ra_tiff normtiff RUNTIME DESTINATION bin)
138 <  install(FILES ${TIFF_LIBRARIES} DESTINATION bin)
139 <  install(PROGRAMS ran2tiff.csh DESTINATION bin RENAME ran2tiff)
137 >  if(BUILD_LIBTIFF)
138 >    add_dependencies(ra_tiff libtiff)
139 >    add_dependencies(normtiff libtiff)
140 >  endif()
141 >  install(TARGETS ra_tiff normtiff
142 >    RUNTIME DESTINATION "bin"
143 >  )
144 >  # install(FILES ${TIFF_LIBRARIES} DESTINATION "bin")
145 >  install(PROGRAMS ran2tiff.csh
146 >    DESTINATION "bin"
147 >    RENAME ran2tiff
148 >  )
149   #TODO: else case
150   endif()
151  
152 < install(TARGETS pfilt pflip ttyimage psign pvalue pcompos protate
153 <  ra_hexbit ra_bmp ra_t8 ra_t16 pcomb pinterp ra_ppm ra_rgbe ra_pict ra_ps
154 <  pextrem ra_gif ra_xyze macbethcal pcond pcwarp
155 <  RUNTIME DESTINATION bin)
152 > install(TARGETS
153 >  macbethcal
154 >  pcomb
155 >  pcompos
156 >  pcond
157 >  pcwarp
158 >  pextrem
159 >  pfilt
160 >  pflip
161 >  pinterp
162 >  pmblur2
163 >  protate
164 >  psign
165 >  psketch
166 >  pvalue
167 >  ra_bmp
168 >  ra_gif
169 >  ra_hexbit
170 >  ra_pict
171 >  ra_ppm
172 >  ra_ps
173 >  ra_rgbe
174 >  ra_t16
175 >  ra_t8
176 >  ra_xyze
177 >  ttyimage
178 >  RUNTIME DESTINATION "bin"
179 > )
180  
181   if(WIN32)
182 <  install(PROGRAMS falsecolor.pl DESTINATION bin)
182 >  add_custom_target(perl ALL
183 >    COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/falsecolor.pl -o
184 >    ${CMAKE_CURRENT_SOURCE_DIR}/falsecolor.exe -d
185 >  )
186 >  add_custom_target(phisto ALL
187 >    COMMAND pp ${CMAKE_CURRENT_SOURCE_DIR}/phisto.pl -o
188 >    ${CMAKE_CURRENT_SOURCE_DIR}/phisto.exe -d
189 >  )
190 >  install(PROGRAMS falsecolor.exe phisto.exe
191 >    DESTINATION "bin"
192 >  )
193   else()
194 <  install(PROGRAMS falsecolor.pl DESTINATION bin RENAME falsecolor)
195 <  install(PROGRAMS normpat.csh DESTINATION bin RENAME normpat)
196 <  install(PROGRAMS pdfblur.csh DESTINATION bin RENAME pdfblur)
197 <  install(PROGRAMS pmblur.csh DESTINATION bin RENAME pmblur)
198 <  install(PROGRAMS pmdblur.csh DESTINATION bin RENAME pmdblur)
199 <  install(PROGRAMS xyzimage.csh DESTINATION bin RENAME xyzimage)
200 <  install(PROGRAMS pgblur.csh DESTINATION bin RENAME pgblur)
201 <  install(PROGRAMS ra_pfm.csh DESTINATION bin RENAME ra_pfm)
202 <  install(PROGRAMS pbilat.csh DESTINATION bin RENAME pbilat)
203 <  install(PROGRAMS phisto.csh DESTINATION bin RENAME phisto)
194 >  install_and_copy_without_extension(
195 >    falsecolor.pl
196 >    normpat.csh
197 >    pdfblur.csh
198 >    pgblur.csh
199 >    phisto.pl
200 >    pmblur.csh
201 >    pmdblur.csh
202 >    ra_pfm.csh
203 >    xyzimage.csh
204 >  )
205   endif()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines