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 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
|
set(HELP_ID ${PROJECT_NAME})
set(HELP_FIGURES_DIR figures)
set(HELP_MEDIA
${HELP_FIGURES_DIR}/color-000000.png
${HELP_FIGURES_DIR}/color-204a87.png
${HELP_FIGURES_DIR}/color-2e3436.png
${HELP_FIGURES_DIR}/color-4e9a06.png
${HELP_FIGURES_DIR}/color-5c3566.png
${HELP_FIGURES_DIR}/color-8f5902.png
${HELP_FIGURES_DIR}/color-a40000.png
${HELP_FIGURES_DIR}/color-c4a000.png
${HELP_FIGURES_DIR}/color-ccccccffffff.png
${HELP_FIGURES_DIR}/color-ce5c00.png
${HELP_FIGURES_DIR}/evolution.svg
${HELP_FIGURES_DIR}/html-composer-insert-image.png
${HELP_FIGURES_DIR}/html-composer-insert-link.png
${HELP_FIGURES_DIR}/html-composer-insert-rule.png
${HELP_FIGURES_DIR}/html-composer-insert-table.png
${HELP_FIGURES_DIR}/minus-icon.png
${HELP_FIGURES_DIR}/new-mail-switcher.png
${HELP_FIGURES_DIR}/plus-icon.png
${HELP_FIGURES_DIR}/search-icon.png
${HELP_FIGURES_DIR}/window-overview-layers.png
)
set(HELP_FILES
backup-restore.page
calendar-alarms-and-reminders.page
calendar-caldav.page
calendar-classifications.page
calendar-free-busy.page
calendar-google.page
calendar-layout-appointment-display.page
calendar-layout-general-formatting.page
calendar-layout.page
calendar-layout-views.page
calendar-local.page
calendar-marcus-bains-line.page
calendar-meetings-delegating.page
calendar-meetings.page
calendar-meetings-replying-to-invitation.page
calendar-meetings-sending-invitation.page
calendar-organizing.page
calendar-publishing.page
calendar-recurrence.page
calendar-searching.page
calendar-sharing-information.page
calendar-timezones.page
calendar-usage-add-appointment.page
calendar-usage-delete-appointment.page
calendar-usage-edit-appointment.page
calendar-usage.page
calendar-using-several-calendars.page
calendar-weather.page
calendar-webdav.page
contacts-add-automatically.page
contacts-autocompletion.page
contacts-carddav.page
contacts-google.page
contacts-ldap.page
contacts-libreoffice.page
contacts-local.page
contacts-organizing.page
contacts-searching.page
contacts-usage-add-contact.page
contacts-usage-delete-contact.page
contacts-usage-edit-contact.page
contacts-usage.page
contacts-using-contact-lists.page
contacts-using-several-addressbooks.page
credits.page
customize-ui-items.page
data-storage.page
default-browser.page
deleting-appointments.page
deleting-emails.page
deleting-to-free-disk-space.page
exporting-data-calendar.page
exporting-data-contacts.page
exporting-data-mail.page
exporting-data.page
flatpak-limitations.page
google-services.page
import-apps-mozilla.page
import-apps-kmail.page
import-apps-outlook.page
import-data.page
import-single-files.page
import-supported-file-formats.page
index.page
intro-account-types.page
intro-first-run.page
intro-keyboard-shortcuts.page
intro-main-window.page
legal.xml
mail-access-gmail-imap-account.page
mail-access-gmail-pop-account.page
mail-account-manage-imap-plus.page
mail-account-manage-local-delivery.page
mail-account-manage-maildir-format-directories.page
mail-account-management.page
mail-account-manage-mh-format-directories.page
mail-account-manage-microsoft-exchange-evo-ews.page
mail-account-manage-microsoft-exchange-evo-mapi.page
mail-account-manage-microsoft-exchange.page
mail-account-manage-pop.page
mail-account-manage-unix-mbox-spool-directory.page
mail-account-manage-unix-mbox-spool-file.page
mail-account-manage-usenet-news.page
mail-attachments.page
mail-attachments-received.page
mail-attachments-sending.page
mail-calendar-sending-invitations.page
mail-cannot-see.page
mail-change-columns-in-message-list.page
mail-change-time-format.page
mail-composer-change-quotation-string.page
mail-composer-custom-header-lines.page
mail-composer-enable-html-format.page
mail-composer-external-editor.page
mail-composer-forward.page
mail-composer-forward-as-attachment.page
mail-composer-from-field-override.page
mail-composer-html-image.page
mail-composer-html-link.page
mail-composer-html.page
mail-composer-html-rule.page
mail-composer-html-table.page
mail-composer-html-text.page
mail-composer-mail-signatures-manage.page
mail-composer-mail-signatures.page
mail-composer-mail-signatures-per-account.page
mail-composer-message-templates.page
mail-composer-message-templates-reply.page
mail-composer-message-templates-save.page
mail-composer-message-templates-variables.page
mail-composer-plain-text.page
mail-composer-priority.page
mail-composer-reply.page
mail-composer-search.page
mail-composer-send-account-overrides.page
mail-composer-several-recipients.page
mail-composer-spellcheck.page
mail-composer-write-new-message.page
mail-default-CC-and-BCC.page
mail-default-folder-locations.page
mail-delete-and-undelete.page
mail-displaying-character-encodings.page
mail-displaying-collapsible-headers.page
mail-displaying-images-in-html.page
mail-displaying-message.page
mail-displaying-sender-photograph.page
mail-display-message-source.page
mail-duplicates.page
mail-encryption-gpg-create-key.page
mail-encryption-gpg-decrypting.page
mail-encryption-gpg-getting-keys.page
mail-encryption-gpg-set-up.page
mail-encryption-gpg-signing-encrypting.page
mail-encryption.page
mail-encryption-s-mime-manage.page
mail-encryption-s-mime-signing-encrypting.page
mail-filters-actions.page
mail-filters-conditions.page
mail-filters-not-working.page
mail-filters.page
mail-folders.page
mail-follow-up-flag.page
mail-imap-change-send-method.page
mail-imap-subscriptions.page
mail-labels.page
mail-layout-changing.page
mail-localized-re-subjects.page
mail-moving-emails.page
mail-not-sent.page
mail-organizing.page
mail-read-receipts.page
mail-received-notification.page
mail-receiving-options-exchange-ews.page
mail-receiving-options-exchange-mapi.page
mail-receiving-options-imap-plus.page
mail-receiving-options-local-delivery.page
mail-receiving-options-maildir-format-directories.page
mail-receiving-options-mh-format-directories.page
mail-receiving-options.page
mail-receiving-options-pop.page
mail-receiving-options-unix-mbox-spool-directory.page
mail-receiving-options-unix-mbox-spool-file.page
mail-receiving-options-usenet-news.page
mail-refresh-folders.page
mail-save-as-pdf.page
mail-search-folders-add.page
mail-search-folders-conditions.page
mail-search-folders.page
mail-searching-attachment-type.page
mail-searching.page
mail-send-and-receive-automatically.page
mail-send-and-receive-manual.page
mail-send-and-receive.page
mail-sending-options-smtp.page
mail-several-pop-accounts.page
mail-sorting-folder-list.page
mail-sorting-message-list.page
mail-spam-marking.page
mail-spam.page
mail-spam-settings.page
mail-two-trash-folders.page
mail-usenet-subscriptions.page
mail-vertical-view.page
mail-word-wrap.page
mail-working-offline.page
memos-searching.page
memos-usage-add-memo.page
memos-usage-delete-memo.page
memos-usage-edit-memo.page
memos-usage.page
offline.page
organizing.page
problems-debug-how-to.page
problems-getting-help.page
problems-reporting-bugs.page
searching-items.page
start-command-line-parameters.page
sync-with-other-devices.page
tasks-caldav.page
tasks-display-settings.page
tasks-local.page
tasks-organizing.page
tasks-searching.page
tasks-usage-add-task.page
tasks-usage-delete-task.page
tasks-usage-edit-task.page
tasks-usage.page
tasks-using-several-tasklists.page
tasks-webdav.page
using-categories.page
xinclude-filter-vfolder-conditions.xml
xinclude-searching.xml
)
add_custom_target(help-files ALL)
macro(create_help_files_for_lang _lang _helpfilesvar)
set(pofile "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_lang}.po")
set(mofile "${CMAKE_CURRENT_BINARY_DIR}/${dir}/${_lang}.mo")
if(NOT EXISTS ${pofile})
message(FATAL_ERROR "Passed incorrect language '${_lang}' to create_help_files_for_lang()")
endif(NOT EXISTS ${pofile})
set(installed)
set(deps)
foreach(_file ${HELP_FILES})
list(APPEND installed ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/${_file})
list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/C/${_file})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
endforeach(_file)
foreach(_file ${HELP_MEDIA})
list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/C/${_file})
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
list(APPEND deps ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_lang}/${_file})
endforeach(_file)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/index.page
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/${_lang}"
COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o "${mofile}" "${pofile}"
COMMAND ${CMAKE_COMMAND} -E env d="${CMAKE_CURRENT_SOURCE_DIR}/C"
itstool -m "${mofile}" ${${_helpfilesvar}} --output ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/C
COMMENT "Generating '${_lang}' help files"
)
add_custom_target(${_lang}-help-files
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_lang}/index.page
${pofile}
${deps}
)
add_dependencies(help-files ${_lang}-help-files)
install(FILES ${installed}
DESTINATION ${SHARE_INSTALL_PREFIX}/help/${_lang}/${HELP_ID}/
)
endmacro(create_help_files_for_lang)
file(GLOB directories RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *)
foreach(dir ${directories})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${dir}.po")
list(APPEND helpdeps "${CMAKE_CURRENT_BINARY_DIR}/${dir}/index.page")
create_help_files_for_lang(${dir} HELP_FILES)
foreach(_media ${HELP_MEDIA})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}
DESTINATION ${SHARE_INSTALL_PREFIX}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
)
else(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
# Pity, no symlink ability here
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/C/${_media}
DESTINATION ${SHARE_INSTALL_PREFIX}/help/${dir}/${HELP_ID}/${HELP_FIGURES_DIR}/
)
endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${_media}")
endforeach(_media)
endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${dir}.po")
endforeach(dir)
set(cinstalled)
foreach(_file ${HELP_FILES})
list(APPEND cinstalled "${CMAKE_CURRENT_SOURCE_DIR}/C/${_file}")
endforeach(_file)
install(FILES ${cinstalled}
DESTINATION ${SHARE_INSTALL_PREFIX}/help/C/${HELP_ID}/
)
set(cinstalled)
foreach(_file ${HELP_MEDIA})
list(APPEND cinstalled "${CMAKE_CURRENT_SOURCE_DIR}/C/${_file}")
endforeach(_file)
install(FILES ${cinstalled}
DESTINATION ${SHARE_INSTALL_PREFIX}/help/C/${HELP_ID}/${HELP_FIGURES_DIR}
)
|