| 1 |
greg |
1.6 |
add_executable(pfilt pf2.c pf3.c pfilt.c) |
| 2 |
greg |
1.1 |
target_link_libraries(pfilt rtrad) |
| 3 |
|
|
|
| 4 |
|
|
add_executable(pcond pcond.c pcond2.c pcond3.c pcond4.c warp3d.c) |
| 5 |
|
|
target_link_libraries(pcond rtrad) |
| 6 |
|
|
|
| 7 |
|
|
add_executable(pcwarp pcwarp.c warp3d.c) |
| 8 |
|
|
target_link_libraries(pcwarp rtrad) |
| 9 |
|
|
|
| 10 |
|
|
add_executable(ttyimage ttyimage.c) |
| 11 |
|
|
target_link_libraries(ttyimage rtrad) |
| 12 |
|
|
|
| 13 |
|
|
add_executable(pvalue pvalue.c) |
| 14 |
|
|
target_link_libraries(pvalue rtrad) |
| 15 |
|
|
|
| 16 |
|
|
add_executable(pcompos pcompos.c) |
| 17 |
|
|
target_link_libraries(pcompos rtrad) |
| 18 |
|
|
|
| 19 |
|
|
add_executable(psign psign.c) |
| 20 |
|
|
target_link_libraries(psign rtrad) |
| 21 |
|
|
|
| 22 |
|
|
add_executable(ra_gif ra_gif.c clrtab.c neuclrtab.c) |
| 23 |
|
|
target_link_libraries(ra_gif rtrad) |
| 24 |
|
|
|
| 25 |
|
|
add_executable(ra_ps ra_ps.c) |
| 26 |
|
|
target_link_libraries(ra_ps rtrad) |
| 27 |
|
|
|
| 28 |
|
|
add_executable(ra_ppm ra_ppm.c) |
| 29 |
|
|
target_link_libraries(ra_ppm rtrad) |
| 30 |
|
|
|
| 31 |
|
|
add_executable(ra_bmp ra_bmp.c) |
| 32 |
|
|
target_link_libraries(ra_bmp rtrad) |
| 33 |
|
|
|
| 34 |
|
|
add_executable(ra_t8 ra_t8.c clrtab.c neuclrtab.c) |
| 35 |
|
|
target_link_libraries(ra_t8 rtrad) |
| 36 |
|
|
|
| 37 |
|
|
add_executable(ra_t16 ra_t16.c) |
| 38 |
|
|
target_link_libraries(ra_t16 rtrad) |
| 39 |
|
|
|
| 40 |
|
|
add_executable(ra_rgbe ra_rgbe.c) |
| 41 |
|
|
target_link_libraries(ra_rgbe rtrad) |
| 42 |
|
|
|
| 43 |
|
|
add_executable(ra_pict ra_pict.c) |
| 44 |
|
|
target_link_libraries(ra_pict rtrad) |
| 45 |
|
|
|
| 46 |
|
|
add_executable(ra_hexbit ra_hexbit.c) |
| 47 |
|
|
target_link_libraries(ra_hexbit rtrad) |
| 48 |
greg |
1.6 |
|
| 49 |
greg |
1.1 |
if(X11_FOUND) |
| 50 |
|
|
add_executable(ximage x11image.c x11raster.c clrtab.c) |
| 51 |
|
|
target_link_libraries(ximage rtrad ${X11_LIBRARIES}) |
| 52 |
greg |
1.6 |
add_executable(xshowtrace |
| 53 |
|
|
xshowtrace.c |
| 54 |
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c" |
| 55 |
|
|
) |
| 56 |
greg |
1.1 |
target_link_libraries(xshowtrace rtrad ${X11_LIBRARIES}) |
| 57 |
greg |
1.6 |
install(TARGETS ximage xshowtrace |
| 58 |
|
|
RUNTIME DESTINATION "bin" |
| 59 |
|
|
) |
| 60 |
greg |
1.1 |
endif() |
| 61 |
greg |
1.6 |
|
| 62 |
greg |
1.1 |
add_executable(pflip pflip.c) |
| 63 |
|
|
target_link_libraries(pflip rtrad) |
| 64 |
|
|
|
| 65 |
|
|
add_executable(protate protate.c) |
| 66 |
|
|
target_link_libraries(protate rtrad) |
| 67 |
|
|
|
| 68 |
|
|
add_executable(pextrem pextrem.c) |
| 69 |
|
|
target_link_libraries(pextrem rtrad) |
| 70 |
|
|
|
| 71 |
|
|
add_executable(pcomb pcomb.c) |
| 72 |
|
|
target_link_libraries(pcomb rtrad) |
| 73 |
|
|
|
| 74 |
|
|
add_executable(pinterp pinterp.c) |
| 75 |
|
|
target_link_libraries(pinterp rtrad) |
| 76 |
|
|
|
| 77 |
|
|
add_executable(ra_xyze ra_xyze.c) |
| 78 |
|
|
target_link_libraries(ra_xyze rtrad) |
| 79 |
|
|
|
| 80 |
|
|
add_executable(macbethcal macbethcal.c pmapgen.c mx3.c warp3d.c) |
| 81 |
|
|
target_link_libraries(macbethcal rtrad) |
| 82 |
|
|
|
| 83 |
greg |
1.5 |
add_executable(pmblur2 pmblur2.c) |
| 84 |
|
|
target_link_libraries(pmblur2 rtrad) |
| 85 |
|
|
|
| 86 |
greg |
1.4 |
add_executable(psketch psketch.c) |
| 87 |
|
|
target_link_libraries(psketch rtrad) |
| 88 |
|
|
|
| 89 |
greg |
1.3 |
if(NOT TIFF_LIBRARY) |
| 90 |
|
|
find_package(TIFF) |
| 91 |
|
|
endif() |
| 92 |
greg |
1.1 |
mark_as_advanced(CLEAR TIFF_INCLUDE_DIR TIFF_LIBRARY) |
| 93 |
greg |
1.2 |
|
| 94 |
greg |
1.6 |
#special case for manually-built libtiff where find_package fails |
| 95 |
greg |
1.2 |
if(NOT TIFF_FOUND) |
| 96 |
greg |
1.6 |
find_library(TIFF_LIBRARY |
| 97 |
|
|
NAMES libtiff.a tiff tiff3 libtiff |
| 98 |
greg |
1.2 |
PATHS |
| 99 |
greg |
1.6 |
"${CMAKE_CURRENT_SOURCE_DIR}/tiff/libtiff/.libs" |
| 100 |
|
|
"${radiance_BINARY_DIR}/Downloads/Source/radiance_support/src/px/tiff/libtiff/.libs" |
| 101 |
greg |
1.3 |
"C:/Program Files/GnuWin32/lib" |
| 102 |
|
|
"C:/Program Files (x86)/GnuWin32/lib" |
| 103 |
|
|
) |
| 104 |
|
|
#if we found the library, search for tiff.h in <tiff-lib-dir>/../include |
| 105 |
|
|
if(TIFF_LIBRARY) |
| 106 |
|
|
get_filename_component(TIFF_LIBRARY_DIR ${TIFF_LIBRARY} PATH) |
| 107 |
|
|
set(TIFF_INCLUDE_HINT "${TIFF_LIBRARY_DIR}/../include") |
| 108 |
|
|
get_filename_component(TIFF_INCLUDE_HINT "${TIFF_INCLUDE_HINT}" ABSOLUTE) |
| 109 |
|
|
find_file(TIFF_HEADER tiff.h PATHS ${TIFF_INCLUDE_HINT}) |
| 110 |
|
|
mark_as_advanced(TIFF_HEADER) |
| 111 |
|
|
if(TIFF_HEADER) |
| 112 |
|
|
get_filename_component(TIFF_INCLUDE_DIR "${TIFF_HEADER}" PATH) |
| 113 |
|
|
set(TIFF_INCLUDE_DIR "${TIFF_INCLUDE_DIR}" CACHE PATH "Directory containing tiff.h" FORCE) |
| 114 |
|
|
endif() |
| 115 |
|
|
endif() |
| 116 |
greg |
1.6 |
|
| 117 |
greg |
1.2 |
find_library(Z_LIBRARY z) |
| 118 |
|
|
if(TIFF_LIBRARY AND Z_LIBRARY) |
| 119 |
|
|
set(TIFF_FOUND TRUE) |
| 120 |
greg |
1.6 |
get_filename_component(Z_LIBRARY_RESOLVED ${Z_LIBRARY} REALPATH) |
| 121 |
greg |
1.3 |
set(TIFF_LIBRARIES ${TIFF_LIBRARY} ${Z_LIBRARY_RESOLVED}) |
| 122 |
|
|
else() |
| 123 |
|
|
#try find_package again |
| 124 |
|
|
#it should succeed now if TIFF_LIBRARY and TIFF_INCLUDE_DIR are set |
| 125 |
|
|
find_package(TIFF) |
| 126 |
|
|
mark_as_advanced(CLEAR TIFF_INCLUDE_DIR TIFF_LIBRARY) |
| 127 |
greg |
1.2 |
endif() |
| 128 |
|
|
endif() |
| 129 |
|
|
|
| 130 |
greg |
1.1 |
if(TIFF_FOUND) |
| 131 |
|
|
add_executable(ra_tiff ra_tiff.c) |
| 132 |
|
|
target_link_libraries(ra_tiff rtrad ${TIFF_LIBRARIES}) |
| 133 |
greg |
1.2 |
add_executable(normtiff normtiff.c) |
| 134 |
|
|
target_link_libraries(normtiff rtrad ${TIFF_LIBRARIES}) |
| 135 |
greg |
1.6 |
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 |
greg |
1.1 |
#TODO: else case |
| 148 |
|
|
endif() |
| 149 |
|
|
|
| 150 |
greg |
1.6 |
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 |
greg |
1.1 |
|
| 179 |
greg |
1.2 |
if(WIN32) |
| 180 |
greg |
1.6 |
install(PROGRAMS falsecolor.pl |
| 181 |
|
|
DESTINATION "bin" |
| 182 |
|
|
) |
| 183 |
|
|
file(COPY falsecolor.pl |
| 184 |
|
|
DESTINATION "${CMAKE_BINARY_DIR}/bin/Release" |
| 185 |
|
|
) |
| 186 |
greg |
1.2 |
else() |
| 187 |
greg |
1.6 |
install_and_copy_without_extension( |
| 188 |
|
|
falsecolor.pl |
| 189 |
|
|
normpat.csh |
| 190 |
|
|
pbilat.csh |
| 191 |
|
|
pdfblur.csh |
| 192 |
|
|
pgblur.csh |
| 193 |
|
|
phisto.csh |
| 194 |
|
|
pmblur.csh |
| 195 |
|
|
pmdblur.csh |
| 196 |
|
|
ra_pfm.csh |
| 197 |
|
|
xyzimage.csh |
| 198 |
|
|
) |
| 199 |
greg |
1.2 |
endif() |