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