2 find_package(LibXml2 REQUIRED)
3 find_package(LibXslt REQUIRED)
5 include_directories( ${KDE4_KIO_INCLUDES} )
6 #include_directories( ${CMAKE_SOURCE_DIR}/kioslave ${CMAKE_SOURCE_DIR}/kioslave/bzip2 )
8 include_directories( ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR} )
10 configure_file(checkXML.in.cmake ${CMAKE_CURRENT_BINARY_DIR}/checkXML )
11 configure_file(config-kdoctools.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdoctools.h )
12 #macro_additional_clean_files( ${CMAKE_CURRENT_BINARY_DIR}/checkXML )
15 ########### next target ###############
17 set(kio_help_PART_SRCS
24 kde4_add_plugin(kio_help ${kio_help_PART_SRCS})
26 target_link_libraries(kio_help ${KDE4_KDECORE_LIBS} kio ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} )
28 install(TARGETS kio_help DESTINATION ${PLUGIN_INSTALL_DIR} )
31 ########### next target ###############
33 set(kio_ghelp_PART_SRCS kio_help.cpp main_ghelp.cpp xslt.cpp )
36 kde4_add_plugin(kio_ghelp ${kio_ghelp_PART_SRCS})
38 target_link_libraries(kio_ghelp ${KDE4_KDECORE_LIBS} kio ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES} )
40 install(TARGETS kio_ghelp DESTINATION ${PLUGIN_INSTALL_DIR} )
43 ########### next target ###############
45 set(meinproc_SRCS meinproc.cpp xslt.cpp )
48 kde4_add_executable(meinproc4 NOGUI RUN_UNINSTALLED ${meinproc_SRCS})
50 target_link_libraries(meinproc4 kio ${KDE4_KDECORE_LIBS} ${LIBXML2_LIBRARIES} ${LIBXSLT_LIBRARIES})
53 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/meinproc4_final_cpp.cpp PROPERTIES COMPILE_FLAGS -DSIMPLE_XSLT )
54 else(KDE4_ENABLE_FINAL)
55 set_source_files_properties(xslt.cpp PROPERTIES COMPILE_FLAGS -DSIMPLE_XSLT )
56 endif(KDE4_ENABLE_FINAL)
58 # "export" this target too so we can use the LOCATION property of the imported target in
59 # FindKDE4Internal.cmake to get the full path to the installed executable instead of using FIND_PROGRAM(), Alex
60 install(TARGETS meinproc4 EXPORT kdelibsToolsTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
63 ########### next target ###############
65 set(genshortcutents_SRCS genshortcutents.cpp )
68 kde4_add_executable(genshortcutents NOGUI ${genshortcutents_SRCS})
70 target_link_libraries(genshortcutents ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
73 ########### install files ###############
75 install( FILES help.protocol ghelp.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
76 install( FILES kio_help.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update )
78 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/checkXML DESTINATION ${BIN_INSTALL_DIR} )
81 install( FILES kio_help.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
82 install( PROGRAMS move_kio_help_cache.sh DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )
85 macro(INSTALL_CUSTOMIZE_DIR _expr _directory)
86 FILE(GLOB _file_CUST "${_expr}" )
87 foreach(_curentfile ${_file_CUST})
88 install(FILES ${_curentfile} DESTINATION ${DATA_INSTALL_DIR}/ksgmltools2/${_directory} )
89 endforeach(_curentfile ${_file_CUST})
90 endmacro(INSTALL_CUSTOMIZE_DIR _expr _directory)
92 set(docbookdir xml-dtd-4.1.2 xml-dtd-4.2 xsl )
95 set(expr "docbook/README.kde")
96 INSTALL_CUSTOMIZE_DIR( ${expr} docbook/)
98 foreach (_currentdocbookdir ${docbookdir})
99 set(expr "docbook/${_currentdocbookdir}/*.mod")
100 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
101 set(expr "docbook/${_currentdocbookdir}/*.txt")
102 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
103 set(expr "docbook/${_currentdocbookdir}/*.dtd")
104 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
105 set(expr "docbook/${_currentdocbookdir}/*.cat")
106 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
107 set(expr "docbook/${_currentdocbookdir}/README*")
108 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
109 set(expr "docbook/${_currentdocbookdir}/Changelog*")
110 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
111 set(expr "docbook/${_currentdocbookdir}/*.xml")
112 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
113 set(expr "docbook/${_currentdocbookdir}/VERSION*")
114 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
115 set(expr "docbook/${_currentdocbookdir}/What*")
116 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/)
118 set(expr "docbook/${_currentdocbookdir}/ent/*.ent")
119 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/ent/)
121 set(expr "docbook/${_currentdocbookdir}/common/*.xsl")
122 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/common/)
123 set(expr "docbook/${_currentdocbookdir}/common/*.xml")
124 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/common/)
125 set(expr "docbook/${_currentdocbookdir}/common/*.dtd")
126 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/common/)
127 set(expr "docbook/${_currentdocbookdir}/common/Changelog")
128 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/common/)
130 set(expr "docbook/${_currentdocbookdir}/html/*.xsl")
131 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/html/)
132 set(expr "docbook/${_currentdocbookdir}/html/*.xml")
133 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/html/)
134 set(expr "docbook/${_currentdocbookdir}/html/*.dtd")
135 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/html/)
136 set(expr "docbook/${_currentdocbookdir}/html/Changelog")
137 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/html/)
138 set(expr "docbook/${_currentdocbookdir}/html/*.ent")
139 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/html/)
140 set(expr "docbook/${_currentdocbookdir}/html/*.xweb")
141 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/html/)
143 set(expr "docbook/${_currentdocbookdir}/images/*.png")
144 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/)
145 set(expr "docbook/${_currentdocbookdir}/images/*.gif")
146 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/)
147 set(expr "docbook/${_currentdocbookdir}/images/*.tif")
148 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/)
149 set(expr "docbook/${_currentdocbookdir}/images/Changelog")
150 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/)
152 set(expr "docbook/${_currentdocbookdir}/images/callouts/*.png")
153 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/callouts/)
154 set(expr "docbook/${_currentdocbookdir}/images/callouts/*.gif")
155 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/callouts/)
156 set(expr "docbook/${_currentdocbookdir}/images/callouts/Changelog")
157 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/images/callouts/)
159 set(expr "docbook/${_currentdocbookdir}/lib/lib.*")
160 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/lib/)
161 set(expr "docbook/${_currentdocbookdir}/lib/Changel*")
162 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/lib/)
163 set(expr "docbook/${_currentdocbookdir}/lib/README*")
164 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/lib/)
166 set(expr "docbook/${_currentdocbookdir}/manpages/*.xsl")
167 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/manpages/)
169 set(expr "docbook/${_currentdocbookdir}/params/*.xml")
170 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/params/)
171 set(expr "docbook/${_currentdocbookdir}/params/Changelog")
172 install_customize_dir( ${expr} docbook/${_currentdocbookdir}/params/)
175 endforeach(_currentdocbookdir ${docbookdir})
178 set(expr "customization/*.xsl")
179 install_customize_dir( ${expr} customization/)
181 set(expr "customization/README")
182 install_customize_dir( ${expr} customization/)
184 set(expr "customization/catalog.xml")
185 install_customize_dir( ${expr} customization/)
187 set(customizedir af bg ca cs da de dtd el en-GB en entities eo es et fi fo fr gl he hu id it ja ko lt nl nn no obsolete pl pt-BR pt ro ru sk sl sr sr@latin sv th tr uk wa xh xsl xx zh-CN zh-TW)
189 foreach (_currentcustomizedir ${customizedir})
190 set(expr "customization/${_currentcustomizedir}/README")
191 install_customize_dir( ${expr} customization/${_currentcustomizedir})
192 set(expr "customization/${_currentcustomizedir}/*.entities")
193 install_customize_dir( ${expr} customization/${_currentcustomizedir})
194 set(expr "customization/${_currentcustomizedir}/*.xsl")
195 install_customize_dir( ${expr} customization/${_currentcustomizedir})
196 set(expr "customization/${_currentcustomizedir}/obsolete/*.elements")
197 install_customize_dir( ${expr} customization/${_currentcustomizedir}/obsolete/)
198 set(expr "customization/${_currentcustomizedir}/obsolete/*.dtd")
199 install_customize_dir( ${expr} customization/${_currentcustomizedir}/obsolete/)
200 set(expr "customization/${_currentcustomizedir}/entities/*.docbook")
201 install_customize_dir( ${expr} customization/${_currentcustomizedir}/entities/ )
202 set(expr "customization/${_currentcustomizedir}/entities/*.entities")
203 install_customize_dir( ${expr} customization/${_currentcustomizedir}/entities/ )
204 set(expr "customization/${_currentcustomizedir}/*.xml")
205 install_customize_dir(${expr} customization/${_currentcustomizedir} )
206 set(expr "customization/${_currentcustomizedir}/*.dtd")
207 install_customize_dir(${expr} customization/${_currentcustomizedir}/)
208 set(expr "customization/${_currentcustomizedir}/*.elements")
209 install_customize_dir(${expr} customization/${_currentcustomizedir}/)
211 endforeach(_currentcustomizedir ${customizedir})