summaryrefslogtreecommitdiffstats
path: root/kimgio/CMakeLists.txt
blob: 746ef7b672a6890fbfbaf49808888f6f24831453 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#################################################
#
#  (C) 2010 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${USE_EXCEPTIONS} )

include_directories(
  ${TQT_INCLUDE_DIRS}
  ${CMAKE_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/kdecore
  ${CMAKE_SOURCE_DIR}/kdecore
)

link_directories(
  ${TDECORE_LIBRARY_DIRS}
)


##### kimg_eps ##################################

set( target kimg_eps )

tde_add_kpart( ${target}
  SOURCES eps.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_xview ################################

set( target kimg_xview )

tde_add_kpart( ${target}
  SOURCES xview.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_tiff #################################

if( TIFF_FOUND )
  set( target kimg_tiff )
  tde_add_kpart( ${target}
    SOURCES tiffr.cpp
    LINK kdecore-shared ${TIFF_LIBRARIES}
    DESTINATION ${PLUGIN_INSTALL_DIR}
  )
  install( FILES tiff.kimgio DESTINATION ${SERVICES_INSTALL_DIR} )
endif( TIFF_FOUND )


##### kimg_ico ##################################

set( target kimg_ico )

tde_add_kpart( ${target}
  SOURCES ico.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_jp2 ##################################

if( JASPER_FOUND )
  set( target kimg_jp2 )
  tde_add_kpart( ${target}
    SOURCES jp2.cpp
    LINK kdecore-shared ${JASPER_LIBRARIES}
    DESTINATION ${PLUGIN_INSTALL_DIR}
  )
  install( FILES jp2.kimgio DESTINATION ${SERVICES_INSTALL_DIR} )
endif( JASPER_FOUND )


##### kimg_pcx ##################################

set( target kimg_pcx )
tde_add_kpart( ${target}
  SOURCES pcx.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_tga ##################################

set( target kimg_tga )
tde_add_kpart( ${target}
  SOURCES tga.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_rgb ##################################

set( target kimg_rgb )
tde_add_kpart( ${target}
  SOURCES rgb.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_xcf ##################################

set( target kimg_xcf )
tde_add_kpart( ${target}
  SOURCES xcf.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_dds ##################################

set( target kimg_dds )
tde_add_kpart( ${target}
  SOURCES dds.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### kimg_exr ##################################

if( OPENEXR_FOUND )
  set( target kimg_exr )
  tde_add_kpart( ${target}
    SOURCES exr.cpp
    LINK kdecore-shared ${OPENEXR_LIBRARIES}
    DESTINATION ${PLUGIN_INSTALL_DIR}
  )
  # FIXME COMPILE_FLAGS must be written a little better
  STRING(REGEX REPLACE ";" " -I" OPENEXR_INCLUDE_FLAGS "-I${OPENEXR_INCLUDE_DIRS}")
  set_target_properties( ${target}-module PROPERTIES COMPILE_FLAGS "${OPENEXR_INCLUDE_FLAGS}" )
  install( FILES exr.kimgio DESTINATION ${SERVICES_INSTALL_DIR} )
endif( OPENEXR_FOUND )


##### kimg_psd ##################################

set( target kimg_psd )
tde_add_kpart( ${target}
  SOURCES psd.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)

##### kimg_hdr ##################################

set( target kimg_hdr )
tde_add_kpart( ${target}
  SOURCES hdr.cpp
  LINK kdecore-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### other data ################################

install( FILES
    png.kimgio xpm.kimgio bmp.kimgio pbm.kimgio pgm.kimgio
    ppm.kimgio xbm.kimgio jpeg.kimgio xv.kimgio eps.kimgio
    ico.kimgio gif.kimgio pcx.kimgio tga.kimgio rgb.kimgio
    xcf.kimgio dds.kimgio mng.kimgio psd.kimgio hdr.kimgio
  DESTINATION ${SERVICES_INSTALL_DIR} )