ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/CMakeLists.txt
Revision: 1.2
Committed: Wed Apr 25 22:21:06 2012 UTC (12 years ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.1: +33 -4 lines
Log Message:
Changes to support new Cmake build system

File Contents

# User Rev Content
1 greg 1.1 add_executable(pfilt pfilt.c pf2.c pf3.c)
2     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     if(X11_FOUND)
49     add_executable(ximage x11image.c x11raster.c clrtab.c)
50     target_link_libraries(ximage rtrad ${X11_LIBRARIES})
51     add_executable(xshowtrace xshowtrace.c
52     ${CMAKE_CURRENT_SOURCE_DIR}/../common/x11findwind.c)
53     target_link_libraries(xshowtrace rtrad ${X11_LIBRARIES})
54     install(TARGETS ximage xshowtrace RUNTIME DESTINATION bin)
55     endif()
56     add_executable(pflip pflip.c)
57     target_link_libraries(pflip rtrad)
58    
59     add_executable(protate protate.c)
60     target_link_libraries(protate rtrad)
61    
62     add_executable(pextrem pextrem.c)
63     target_link_libraries(pextrem rtrad)
64    
65     add_executable(pcomb pcomb.c)
66     target_link_libraries(pcomb rtrad)
67    
68     add_executable(pinterp pinterp.c)
69     target_link_libraries(pinterp rtrad)
70    
71     add_executable(ra_xyze ra_xyze.c)
72     target_link_libraries(ra_xyze rtrad)
73    
74     add_executable(macbethcal macbethcal.c pmapgen.c mx3.c warp3d.c)
75     target_link_libraries(macbethcal rtrad)
76    
77     find_package(TIFF)
78     mark_as_advanced(CLEAR TIFF_INCLUDE_DIR TIFF_LIBRARY)
79 greg 1.2
80     #special case for manually built libtiff on Mac where find_package fails
81     if(NOT TIFF_FOUND)
82     unset(TIFF_INCLUDE_DIR CACHE)
83     find_library(TIFF_LIBRARY tiff
84     PATHS
85     ${CMAKE_CURRENT_SOURCE_DIR}/tiff/libtiff/.libs
86     ${radiance_BINARY_DIR}/Downloads/Source/radiance_support/src/px/tiff/libtiff/.libs)
87     find_library(Z_LIBRARY z)
88     if(TIFF_LIBRARY AND Z_LIBRARY)
89     set(TIFF_FOUND TRUE)
90     set(TIFF_LIBRARIES ${TIFF_LIBRARY} ${Z_LIBRARY})
91     endif()
92     endif()
93    
94 greg 1.1 if(TIFF_FOUND)
95     add_executable(ra_tiff ra_tiff.c)
96     target_link_libraries(ra_tiff rtrad ${TIFF_LIBRARIES})
97 greg 1.2 add_executable(normtiff normtiff.c)
98     target_link_libraries(normtiff rtrad ${TIFF_LIBRARIES})
99     install(TARGETS ra_tiff normtiff RUNTIME DESTINATION bin)
100 greg 1.1 install(FILES ${TIFF_LIBRARIES} DESTINATION bin)
101 greg 1.2 install(PROGRAMS ran2tiff.csh DESTINATION bin RENAME ran2tiff)
102 greg 1.1 #TODO: else case
103     endif()
104    
105     install(TARGETS pfilt pflip ttyimage psign pvalue pcompos protate
106     ra_hexbit ra_bmp ra_t8 ra_t16 pcomb pinterp ra_ppm ra_rgbe ra_pict ra_ps
107     pextrem ra_gif ra_xyze macbethcal pcond pcwarp
108     RUNTIME DESTINATION bin)
109    
110 greg 1.2 if(WIN32)
111     install(PROGRAMS falsecolor.pl DESTINATION bin)
112     else()
113     install(PROGRAMS falsecolor.pl DESTINATION bin RENAME falsecolor)
114     install(PROGRAMS normpat.csh DESTINATION bin RENAME normpat)
115     install(PROGRAMS pdfblur.csh DESTINATION bin RENAME pdfblur)
116     install(PROGRAMS pmblur.csh DESTINATION bin RENAME pmblur)
117     install(PROGRAMS pmdblur.csh DESTINATION bin RENAME pmdblur)
118     install(PROGRAMS xyzimage.csh DESTINATION bin RENAME xyzimage)
119     install(PROGRAMS pgblur.csh DESTINATION bin RENAME pgblur)
120     install(PROGRAMS ra_pfm.csh DESTINATION bin RENAME ra_pfm)
121     install(PROGRAMS pbilat.csh DESTINATION bin RENAME pbilat)
122     install(PROGRAMS phisto.csh DESTINATION bin RENAME phisto)
123     endif()