TDE core libraries
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #################################################
  2. #
  3. # (C) 2018 Slávek Banko
  4. # slavek.banko (AT) axis.cz
  5. #
  6. # Improvements and feedback are welcome
  7. #
  8. # This file is released under GPL >= 2
  9. #
  10. #################################################
  11. cmake_minimum_required( VERSION 2.8 )
  12. ##### include our cmake modules #################
  13. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  14. include( TDEL10n )
  15. ##### set directory for POT files ###############
  16. set( POT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../tde-i18n/template/messages/tdelibs" )
  17. ##### verify tqt3 sources #######################
  18. if( NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src )
  19. tde_message_fatal( "TQt3 source code is required but not found" )
  20. endif( )
  21. ##### prepare tqt3/src/xml/qxml.cpp #############
  22. if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp )
  23. # hide "#define" to allow strings to be extracted using xgettext
  24. file( READ ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp _tqt_qxml )
  25. string( REGEX REPLACE "\n(#define[^\n]*)(QT_TRANSLATE_NOOP)" "\n/*\\1*/\\2" _tqt_qxml ${_tqt_qxml} )
  26. file( WRITE ${CMAKE_CURRENT_SOURCE_DIR}/../dependencies/tqt3/src/xml/qxml.cpp.tde_l10n "${_tqt_qxml}" )
  27. endif( )
  28. ##### generate tdeabc/addressee files ###########
  29. execute_process(
  30. COMMAND perl ./makeaddressee
  31. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/scripts
  32. )
  33. ##### create translation templates ##############
  34. tde_l10n_create_template(
  35. CATALOG "tde"
  36. SOURCES "common_texts.cpp"
  37. EXCLUDES "_translatorinfo"
  38. X-POT -
  39. DESTINATION "."
  40. )
  41. tde_l10n_create_template(
  42. CATALOG "tdelibs"
  43. SOURCES
  44. "."
  45. "tdecore/tde-config.cpp.cmake"
  46. "../dependencies/tqt3/src"
  47. "../dependencies/tqt3/src/xml/qxml.cpp.tde_l10n"
  48. EXCLUDES
  49. "/test/" "/tests/"
  50. "^arts/kde/mcop-dcop/"
  51. "^arts/knotify/"
  52. "^interfaces/tdemediaplayer/tdefileaudiopreview/"
  53. "^kate/"
  54. "^kdoctools/"
  55. "^libtdescreensaver/"
  56. "^tdeabc/formats/"
  57. "^tdeabc/plugins/"
  58. "^tdecmshell/"
  59. "^tdecore/tdeconfig_compiler/example/"
  60. "^tdeio/"
  61. "^tdeioslave/"
  62. "^tdeprint/"
  63. "^tdeui/colors/"
  64. "^tdestyles/.*/config/"
  65. "/dependencies/tqt3/src/xml/qxml.cpp$"
  66. KEYWORDS
  67. tr tr:1,2
  68. translate translate:1,2
  69. QT_TRANSLATE_NOOP QT_TRANSLATE_NOOP:1,2
  70. X-POT "-"
  71. )
  72. ##### clenaup tdeabc/addressee files ############
  73. file( REMOVE
  74. ${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/addressee.cpp
  75. ${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/addressee.h
  76. ${CMAKE_CURRENT_SOURCE_DIR}/tdeabc/field.cpp
  77. )
  78. ##### create translation templates ##############
  79. tde_l10n_auto_add_subdirectories( )