Improved options for calling tde_create_translated_desktop #57

Manually merged
SlavekB merged 1 commits from feat/translated_desktop_processing_more into master 4 years ago
Owner
  1. Add the ability to call for the same source file installed in another location.
  2. Process the source file using configure_file if it has a .cmake extension.
  3. PO_DIR can be specified as relative.
  4. Add the ability to process multiple source files to be installed in the same destination folder.

Thanks to these changes, the call originally looked as follows:

foreach( _desktop
    linkProgram.desktop linkURL.desktop linkFloppy.desktop
    linkHD.desktop linkCDROM.desktop Directory.desktop
    TextFile.desktop HTMLFile.desktop linkZIP.desktop
    linkDVDROM.desktop linkCAMERA.desktop linkNFS.desktop
    linkCDWRITER.desktop linkMO.desktop
)
  tde_create_translated_desktop(
    SOURCE ${_desktop}
    DESTINATION ${TEMPLATES_INSTALL_DIR}
    PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kdesktop-icons
  )
endforeach()

It can now look like this:

tde_create_translated_desktop(
  SOURCE
    linkProgram.desktop linkURL.desktop linkFloppy.desktop
    linkHD.desktop linkCDROM.desktop Directory.desktop
    TextFile.desktop HTMLFile.desktop linkZIP.desktop
    linkDVDROM.desktop linkCAMERA.desktop linkNFS.desktop
    linkCDWRITER.desktop linkMO.desktop
  DESTINATION ${TEMPLATES_INSTALL_DIR}
  PO_DIR kdesktop-icons
)

Modifications are made so that they do not affect compatibility for existing calls. Anyway, before the final merge there I'll have to do the merge with improvements to the use of LINGUAS made in #55.

1. Add the ability to call for the same source file installed in another location. 2. Process the source file using `configure_file` if it has a `.cmake` extension. 3. `PO_DIR` can be specified as relative. 4. Add the ability to process multiple source files to be installed in the same destination folder. Thanks to these changes, the call originally looked as follows: ``` foreach( _desktop linkProgram.desktop linkURL.desktop linkFloppy.desktop linkHD.desktop linkCDROM.desktop Directory.desktop TextFile.desktop HTMLFile.desktop linkZIP.desktop linkDVDROM.desktop linkCAMERA.desktop linkNFS.desktop linkCDWRITER.desktop linkMO.desktop ) tde_create_translated_desktop( SOURCE ${_desktop} DESTINATION ${TEMPLATES_INSTALL_DIR} PO_DIR ${CMAKE_SOURCE_DIR}/translations/desktop_files/kdesktop-icons ) endforeach() ``` It can now look like this: ``` tde_create_translated_desktop( SOURCE linkProgram.desktop linkURL.desktop linkFloppy.desktop linkHD.desktop linkCDROM.desktop Directory.desktop TextFile.desktop HTMLFile.desktop linkZIP.desktop linkDVDROM.desktop linkCAMERA.desktop linkNFS.desktop linkCDWRITER.desktop linkMO.desktop DESTINATION ${TEMPLATES_INSTALL_DIR} PO_DIR kdesktop-icons ) ``` Modifications are made so that they do not affect compatibility for existing calls. Anyway, before the final merge there I'll have to do the merge with improvements to the use of LINGUAS made in #55.
MicheleC approved these changes 4 years ago
MicheleC left a comment
Owner

Excellent work!

Excellent work!
SlavekB closed this pull request 4 years ago
SlavekB deleted branch feat/translated_desktop_processing_more 4 years ago
SlavekB added this to the R14.0.9 release milestone 4 years ago
The pull request has been manually merged as 7592371d26.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tde-cmake#57
Loading…
There is no content yet.