blob: 25ce07de87168a43b9c9f4c8b61035e676f97515 (
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
|
#################################################
#
# (C) 2019 Slávek Banko
# slavek.banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
##### set project version ########################
include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
tde_set_project_version( )
##### include our cmake modules #################
include( TDEL10n )
##### set directory for POT files ###############
set( POT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../tde-i18n/template/messages/tdevelop" )
##### create translation templates ##############
tde_l10n_create_template(
CATALOG "tdevelop"
EXCLUDES
"^kdevdesigner/src/"
"^parts/tipofday/"
)
tde_l10n_auto_add_subdirectories()
file(
GLOB_RECURSE _desktops
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.desktop
)
list( SORT _desktops )
file(
GLOB_RECURSE _protocols
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.protocol
)
list( SORT _protocols )
file(
GLOB_RECURSE _directories
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.directory
)
list( SORT _directories )
file(
GLOB_RECURSE _plugins
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.plugin
)
list( SORT _plugins )
file(
GLOB_RECURSE _profiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*profile.config
)
list( SORT _profiles )
file(
GLOB_RECURSE _template_names
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.kdevtemplate
)
unset( _templates )
foreach( _template_name IN LISTS _template_names )
string( REGEX REPLACE "\\.kdevtemplate$" "" _template_base ${_template_name} )
if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_template_base}" AND
NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_template_base}" )
list( APPEND _templates "${_template_base}" )
endif()
list( APPEND _templates "${_template_name}" )
endforeach()
list( SORT _templates )
file(
GLOB_RECURSE _wizards
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/parts/appwizard/imports/*
)
foreach( _wizard_name IN LISTS _wizards )
if( _wizard_name MATCHES "/(CMakeLists\\.txt|CMakeL10n\\.txt|Makefile\\.am)$" OR
_wizard_name MATCHES "\\.[kt]develop" OR
_wizard_name MATCHES "\\.tde_l10n$" OR
_wizard_name MATCHES "/\\." )
list( REMOVE_ITEM _wizards ${_wizard_name} )
endif()
endforeach()
list( SORT _wizards )
tde_l10n_create_template(
CATALOG "desktop_files/tdevelop-desktops/"
SOURCES_DESKTOP
${_desktops}
${_protocols}
${_directories}
${_plugins}
${_profiles}
${_templates}
${_wizards}
KEYWORDS
Category
DESTINATION "${CMAKE_SOURCE_DIR}/translations"
)
tde_l10n_create_template(
CATALOG "desktop_files/tdevelop-eventsrc/"
SOURCES *eventsrc
DESTINATION "${CMAKE_SOURCE_DIR}/translations"
)
|